[Solved] Docker does not start on clean image on RaspberryPi3

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Docker does not start on clean image on RaspberryPi3

Post by MichaIng »

The test can be done safely without risking any system change:

Code: Select all

mv /etc/apt/preferences.d/docker-ce /mnt/dietpi_userdata/docker-ce.bak
cat << _EOF_ > /etc/apt/preferences.d/docker-ce
Package: docker-ce
Pin: version 18.09.0*
Pin-Priority: -1
_EOF_
apt upgrade
# Now check, whether docker-ce update to v18.09.0 is offered or not.
# If it is offered, simply press "n" (or anything NOT "y") to abort and revert via:
mv /mnt/dietpi_userdata/docker-ce.bak /etc/apt/preferences.d/docker-ce
# Else you can remove the backup
rm /mnt/dietpi_userdata/docker-ce.bak
But I fully understand, if you don't want to play with your running system :).
iaresee
Posts: 9
Joined: Fri Nov 23, 2018 10:53 pm

Re: Docker does not start on clean image on RaspberryPi3

Post by iaresee »

MichaIng wrote: Sun Dec 09, 2018 10:09 pm @iaresee
Could you test, if this works?
It installed 18.09.0:

Code: Select all

root@pi-hole:~# docker --version
Docker version 18.09.0, build 4d60db4
That version core dumps on me shortly after startup:

Code: Select all

root@pi-hole:~# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/docker.service.d
           └─dietpi-simple.conf
   Active: failed (Result: core-dump) since Sun 2018-12-09 22:40:35 GMT; 1min 3s ago
     Docs: https://docs.docker.com
  Process: 14925 ExecStart=/usr/bin/dockerd -H unix:// (code=dumped, signal=SEGV)
 Main PID: 14925 (code=dumped, signal=SEGV)
      CPU: 638ms

Dec 09 22:40:32 pi-hole systemd[1]: Started Docker Application Container Engine.
Dec 09 22:40:35 pi-hole systemd[1]: Stopping Docker Application Container Engine...
Dec 09 22:40:35 pi-hole systemd[1]: docker.service: Main process exited, code=dumped, status=11/SEGV
Dec 09 22:40:35 pi-hole systemd[1]: Stopped Docker Application Container Engine.
Dec 09 22:40:35 pi-hole systemd[1]: docker.service: Unit entered failed state.
Dec 09 22:40:35 pi-hole systemd[1]: docker.service: Failed with result 'core-dump'.
My /lib/systemd/system/docker.service remained unchange and patched correctly after the upgrade.
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Docker does not start on clean image on RaspberryPi3

Post by MichaIng »

I assume the systemd unit does not change with the update.

But does it mean, apt update still offers docker-ce v18.09.0 even with

Code: Select all

Package: docker-ce
Pin: version 18.09.0*
Pin-Priority: -1
inside APT preference file?

Ah saw your post update. Okay have to check further how to prevent update for a single package version.

Hmm generally that method should work:

Code: Select all

root@VM-Buster:~# apt list --upgradable
Listing... Done
libgcrypt20/testing 1.8.4-4 amd64 [upgradable from: 1.8.4-3]
libgmp10/testing 2:6.1.2+dfsg-4 amd64 [upgradable from: 2:6.1.2+dfsg-3]
linux-image-amd64/testing 4.18+100 amd64 [upgradable from: 4.18+99]
root@VM-Buster:~# nano /etc/apt/preferences.d/test
root@VM-Buster:~# cat /etc/apt/preferences.d/test
Package: libgcrypt20
Pin: version 1.8.4*
Pin-Priority: -1
root@VM-Buster:~# apt list --upgradable
Listing... Done
libgmp10/testing 2:6.1.2+dfsg-4 amd64 [upgradable from: 2:6.1.2+dfsg-3]
linux-image-amd64/testing 4.18+100 amd64 [upgradable from: 4.18+99]
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Docker does not start on clean image on RaspberryPi3

Post by MichaIng »

@iaresee
Okay I found the issue: There is a leading 5: in current docker-ce version string :roll:.

The following should work then. Might I ask you to retest on RPi?

Code: Select all

echo 'Package: docker-ce
Pin: version 5:18.09.0~3-0~raspbian-stretch
Pin-Priority: -1' > /etc/apt/preferences.d/docker-ce
G_AGI docker-ce=18.06.1~ce~3-0~raspbian
G_AGA
- Updates pin version string
- Downgrades docker again
- Uninstalls obsolete packages

docker-ce-cli is not available for this lower version. Is this an issue or is it included in the main package that lower version? The same for containerd.io, will will be removed as obsolete after downgrade, at least here on Debian Stretch. But should be the same on Raspbian.
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Docker does not start on clean image on RaspberryPi3

Post by MichaIng »

@iaresee @Garret
We just released v6.19.7 which hotfixes the docker issue. On this update, just pre-patches run, like it was for v6.19.6, so no reboot required, no full APT update and DietPi core code download/merge done.

The preferences.d file is named dietpi-docker_fix, so you might want to remove your preferences.d/docker-ce. The one provided with the update allows APT do update, as fast as a new version is available in the repo. I hope/expect a new version will fix the issue on RPi.
iaresee
Posts: 9
Joined: Fri Nov 23, 2018 10:53 pm

Re: [Solved] Docker does not start on clean image on RaspberryPi3

Post by iaresee »

@MichaIng ack. I'll be able to test it out tonight, west coast USA time. Thanks for the tenacity working through this one!
iaresee
Posts: 9
Joined: Fri Nov 23, 2018 10:53 pm

Re: [Solved] Docker does not start on clean image on RaspberryPi3

Post by iaresee »

@MichaIng I seem be running a-okay with this update. No need to reboot after patching and docker-ce is happy with the apt preferences file that's be deposited. I moved aside the existing file I had.

Thank you!
Garret
Posts: 52
Joined: Sat Nov 10, 2018 12:23 pm

Re: [Solved] Docker does not start on clean image on RaspberryPi3

Post by Garret »

Yes, thanks a lot for this issue which was actually not really due to dietpi.
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: [Solved] Docker does not start on clean image on RaspberryPi3

Post by MichaIng »

@Garret @iaresee
Thanks very much for your testing and feedback guys 8).
Post Reply