dietpi-bugreport ID
Docker should start
service docker start
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
The problem is the userdata location line when docker is started.
In /DietPi/dietpi/dietpi-software there is a line:
sed -i "/ExecStart=\/usr\/bin\/dockerd/c\ExecStart=\/usr\/bin\/dockerd -g $G_FP_DIETPI_USERDATA\/docker-data -H fd:\/\/" /lib/systemd/system/docker.service
This line breaks docker startup by setting /lib/systemd/system/docker.service to
ExecStart=/usr/bin/dockerd -g /mnt/dietpi_userdata/docker-data -H fd://
This should be
ExecStart=/usr/bin/dockerd -g /mnt/dietpi_userdata/docker-data -H unix://
@mspieth376
Thanks for report and fix. Will validate on Jessie and Buster systems as well, then merge accordingly for v6.18.
Testing:
Interesting, official packaging repo service unit still contains fd://: https://github.com/docker/docker-ce-packaging/blob/master/deb/systemd/docker.service
Generally I don't like editing systemd units directly. If really, better move it into a docker.service.d/dietpi.conf file, but:
Opened PR: https://github.com/Fourdee/DietPi/pull/2247
Testing for running of Docker after install + reboot:
root@DietPi:~# systemctl status docker -l
β docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset:
enabled)
Active: activating (start) since Fri 2018-11-16 16:51:21 GMT; 3min 32s ago
Docs: https://docs.docker.com
Main PID: 944 (dockerd)
CPU: 340ms
CGroup: /system.slice/docker.service
ββ944 /usr/bin/dockerd -H unix://
Nov 16 16:51:21 DietPi systemd[1]: Starting Docker Application Container Engine.
..

-- π―οΈ SIGTERM on systemctl start docker
DietPi-Software
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Mode: Configuring Docker: Build, ship, and run distributed applications
/DietPi/dietpi/dietpi-software: line 11879: /etc/docker/daemon.json: No such file or directory
-- non x86, uses docker-engine package. /etc/docker does not exist.
π―οΈ Service type "simple" fixes RPi service failure. Previously notify.
root@DietPi:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
61e750ce94d2: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
Hmm, with RPi, systemctl start docker hangs during boot.
Downside is it prevents dietpi-services start from continuing, until Docker is finished loading.
Will set service type to simple, to prevent the above.
Retest:
@MichaIng
Great work Micha on fix, works a charm, completed.
@Fourdee
Great non-x86 fix as well.
As long as we cannot find the reason for the hang, this is the best we can do.
Perhaps docker requires something else to start-up? Is there some log that gives an indication?
But actually funny since dietpi services starts it at end of boot, later than how systemd would do :thinking:.
So default APT install with systemd control should have the same issue then, perhaps we can find something about it in web, RPi + docker...
Hello everybody, I believe to be the main responsible to have found out about this bug (https://dietpi.com/phpbb/viewtopic.php?f=11&t=5227) but to me the workaround does not work.
Do you know if there is a solution or if you want I can paste some logs if you tell me which commands to give. Sorry, I am very newbie to Docker.
Lol, on official repo, fd:// is again in service file, working well now on Stretch...
Indeed best to not touch service file directly, if it is changed back and forth π.