Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Container restart policy not set by documented "docker run" command #14

Open
GotSka81 opened this issue Jun 29, 2020 · 3 comments
Open
Labels
documentation Documentation needs updated to inform on this topic good first issue Good for newcomers

Comments

@GotSka81
Copy link

GotSka81 commented Jun 29, 2020

Image Setup Details

  • Image Tag: latest
  • Docker Host OS: Ubuntu 18.04.4 LTS
  • docker run command or docker-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"

@thmhoag thmhoag added documentation Documentation needs updated to inform on this topic good first issue Good for newcomers labels Jul 9, 2020
@thmhoag
Copy link
Owner

thmhoag commented Jul 9, 2020

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. 😄

@Trollkoekske
Copy link

Hey @thmhoag,

Is there any way to change the restart time? Used the --restart always and works fine 👍

@jkread
Copy link

jkread commented Feb 11, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation needs updated to inform on this topic good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants