Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions for starting container on reboot #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mygod
Copy link

@Mygod Mygod commented May 1, 2020

@CLAassistant
Copy link

CLAassistant commented May 1, 2020

CLA assistant check
All committers have signed the CLA.

@huan
Copy link
Owner

huan commented May 1, 2020

Thanks for your contribution! But I believe the --restart=always docker run parameter has already made the container start on reboot?

@Mygod
Copy link
Author

Mygod commented May 1, 2020

According to my test it only starts after logon.

@huan
Copy link
Owner

huan commented May 2, 2020

I don't think do, because I have many servers and I don't remember there's any cases that the container can not get started after the server reboot.

Could you please double confirm it?

@Mygod
Copy link
Author

Mygod commented May 3, 2020

Actually it only runs after I run docker ps. Selection of syslog:

May  3 09:22:55 server kernel: [    0.000000] Linux version 5.3.0-51-generic (buildd@lgw01-amd64-018) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04))
#44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 (Ubuntu 5.3.0-51.44~18.04.2-generic 5.3.18)
...
(log in)
May  3 09:27:45 server systemd[1]: Starting User Manager for UID 0...
...
(run docker ps)
May  3 09:30:08 server systemd[1]: Reached target Network is Online.
May  3 09:30:08 server systemd[1]: Starting Docker Application Container Engine...

Using crontab fixes this.

@huan huan added the question label May 10, 2020
@huan
Copy link
Owner

huan commented May 10, 2020

I'll have a test about it when I got time.

Basically I don't think that there's any need to add anything into the crontab.

@huan huan removed the question label Dec 12, 2020
@huan
Copy link
Owner

huan commented Dec 12, 2020

I believe the answer in the StackOverflow link agree with me that there's no crontab need to be added: https://stackoverflow.com/a/30450350/1123955

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants