«Restart Policy: Always» not respected after reboot of host, but do work after restart of docker service (Fedora 25 Server)

As the title says, the restart policy is not respected after a reboot of the host but works fine after a “systemctl restart docker”. I am using a fresh install of Fedora 25 Server and use Cockpit for simple management of the containers. The container in question is built from the official nginx image with a short Dockerfile with a COPY command, nothing fancy.

The docker service is enabled and runs without any errors at boot. Have I overlooked something basic?

the same issue for Fedora 25, official HOWTO about “restart always” policy is:

sudo systemctl enable docker.service
sudo systemctl enable docker
sudo systemctl start docker

but doesnt work

not sure if its Fedora or Docker bug… someone has fix/workaround for this?
only systemctl restart docker helps for now…

1 Like

It seems to be a known problem in docker, and there are some open and closed tickets that is related to this issue. Hopefully it will be fixed shortly and a ‘dnf upgrade’ will fix the problem!

From what I have read, it seems to be related to docker trying to start the container(s) before some other service / component is ready, causing the container(s) to fail to start.

Can you maybe provide links to these tickets? I cannot find any open bug report about this neither in the Docker repo nor in Fedora Bugzilla. This issue is a big blocker for using docker in a fedora production system!

I can’t find any tickets related to this now (after a quick search). I might av seen the problem described on forums and not in a ticket … I can’t remember anymore.

Anyway, I just updated my Fedora 25 Server, and I can confirm that the problem persists. It’s quite surprising that such basic functionality is broken for a long periode of time.

I have same problem, and “journalctl -u docker.service” have this error:“Failed to start container 3d9…1e: open /etc/resolv.conf: no such file or directory”

The reson of my computer(deepin) is :/etc/resolv.conf is a hard link of /run/NetworkManager/resolv.conf , not regular file.

Solve:rm -f /etc/resolv.conf && cp /run/NetworkManager/resolv.conf /etc/resolv.conf

Why is manual start ok? I do not know.