factoriotools / factorio-docker

Factorio headless server in a Docker container
https://hub.docker.com/r/factoriotools/factorio/
MIT License
1.06k stars 237 forks source link

Docker container permissions issue in entrypoint.sh #326

Closed AndrewMorris-scsu closed 4 years ago

AndrewMorris-scsu commented 4 years ago

Hello, about a week ago, my server started having issues where the container is constantly in a "Restarting state". Looking at the logs, it is running into a permissions issue when trying to execute the entrypoint.sh script. Here is a screenshot of the logs from the container: image

I'm no great docker mind, but from some googling it looks like the entrypoint.sh script needs to be set as an executable?

I'm currently using the "stable" version of the docker image.

Any help would be appreciated!!

AndrewMorris-scsu commented 4 years ago

Other information that could be helpful: This is an Azure VM: Ubuntu Server 18.04 docker version: Docker version 19.03.11, build dd360c7 docker run script:

sudo docker run -d \
  -p 34197:34197/udp \
  -p 27015:27015/tcp \
  -v SOMEFOLDERPATHHERE/factorio:/factorio \
  --name factorio \
  --restart=always \
  factoriotools/factorio:stable
AndrewMorris-scsu commented 4 years ago

Also, I should mention, this server has been up and working since early April, and all of a sudden stopped working after a nightly restart. Not sure if that helps point toward the issue.

SuperSandro2000 commented 4 years ago

Can you try pulling the latest image via sudo docker pull factoriotools/factorio:stable and then recreate the container? THe latest image works for me and does not produce this error.

louga31 commented 4 years ago

Try to replace ENTRYPOINT ["/docker-entrypoint.sh"] with ENTRYPOINT ["/bin/bash", "/docker-entrypoint.sh"], it worked for me

SuperSandro2000 commented 4 years ago

I think the issue is that you cloned the to a file system that does not support +x or you have a restrictive umask which creates the permissions issues. Nothing I want to support.

The above only applies when you build the container yourself.

The scripts have the execute bit set so closing.