ex0nuss / Remote-Wake-Sleep-On-LAN-Docker

A docker image of sciguy14/Remote-Wake-Sleep-On-LAN-Server
GNU General Public License v3.0
34 stars 16 forks source link

failed to register layer: unlinkat /root/Remote-Wake-Sleep-On-LAN-Server/bootstrap/ico: invalid argument #14

Open fama opened 1 year ago

fama commented 1 year ago

When I tried to start the docker, using docker-compose.yml, I am getting the following error

docker-compose -f docker-compose-wol.yml up -d
[+] Running 4/8
 ⠴ frontend-rwsols Pulling                                                                17.5s
   ⠿ e0b25ef51634 Pull complete                                                            1.8s
   ⠿ 57b16b69e1ee Pull complete                                                            6.4s
   ⠿ 83ab0a617086 Pull complete                                                            6.4s
   ⠿ ae3c226411c2 Pull complete                                                           11.3s
   ⠼ a9b111f67bac Extracting         116kB/116kB                                          16.4s
   ⠼ 96666b233c63 Download complete                                                       16.4s
   ⠼ 9186ae473f25 Download complete                                                       16.4s
failed to register layer: unlinkat /root/Remote-Wake-Sleep-On-LAN-Server/bootstrap/ico: invalid argument

Running docker version 23.0.7 inside LXC container.

It seems that the following line Dockerfile is causing the error:

RUN git clone https://github.com/sciguy14/Remote-Wake-Sleep-On-LAN-Server.git &&\
    chown root: /var/www/html &&\
    chmod u+s `which ping`

I suspect, that the problem in particular is with chown root: /var/www/html &&\.

Does the container need to run with root userid?

djismgaming commented 9 months ago

I do run it in a docker host under my UID=1000 and GID=1000 (ubuntu cloud image on a Proxmox VM). after installing docker and performing the Linux post-install steps.

Though since the image is not having any variables to change the user on runtime, I believe it runs as root inside the container.

Can you post your compose file?

Here's mine:

services:
  RWSOL-Server:
    container_name: RWSOL-Server
    restart: unless-stopped
    entrypoint:
      - /entrypoint.sh
    environment:
      - TZ=America/Puerto_Rico
      - PASSPHRASE=
      - RWSOLS_COMPUTER_NAME=$RWSOLS_COMPUTER_NAME
      - RWSOLS_COMPUTER_MAC=$RWSOLS_COMPUTER_MAC
      - RWSOLS_COMPUTER_IP=$RWSOLS_COMPUTER_IP
      - RWSOLS_MAX_PINGS=10
      - RWSOLS_SLEEP_TIME=5
      - RWSOLS_SLEEP_CMD=suspend
      - RWSOLS_SLEEP_PORT=7760
      - TCP_PORT_9999=9999
      - APACHE2_PORT=9999
    image: ex0nuss/remote-wake-sleep-on-lan-docker
    network_mode: host