arkserver
arkserver copied to clipboard
Container restart policy not set by documented "docker run" command
Image Setup Details
- Image Tag: latest
- Docker Host OS: Ubuntu 18.04.4 LTS
-
docker run
command ordocker-compose.yml
file:
$ docker run -d \
-v steam:/home/steam/Steam \
-v ark:/ark \
-p 27015:27015 -p 27015:27015/udp \
-p 7778:7778 -p 7778:7778/udp \
-p 7777:7777 -p 7777:7777/udp \
thmhoag/arkserver
Description of Issue
The container restart policy is not set by documented "docker run" command. The default restart policy for Docker is "no", and as a result, the container will stop and fail to restart when the arkmanager CRON job for restarting the ark server instance triggers. This CRON job runs at 10:15am every day (UTC time).
Additional Information
Docker documentation about restart policy: https://docs.docker.com/config/containers/start-containers-automatically/
CRON job code from run.sh file that triggers restart (line 69): 15 10 * * * arkmanager restart --warn --saveworld
Recommend updating documented "docker run" command to include "--restart always"
Hey @GotSka81, great find on this one. The docs in this repo could certainly use some improvement. I think I almost always add the --restart always
flag to all my containers so I guess I didn't think about it when writing the docs.
That said, this would be a great first-issue for a PR if you'd like to contribute. 😄
Hey @thmhoag,
Is there any way to change the restart time? Used the --restart always and works fine 👍
Hey @thmhoag,
Is there any way to change the restart time? Used the --restart always and works fine 👍
You can change the cronjob to change when the server does its server and restart. Be aware this doesn't currently honor Timezones. I fixed this issue and a few others in my fork. https://github.com/jkread/arkserver