Struggling to install docker package on odroid

Hi there,

Trying to install docker package on odroid HC4 and getting this error:

root@odroid:~# apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
docker-ce-rootless-extras
The following NEW packages will be installed:
containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras
0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/83.6 MB of archives.
After this operation, 396 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package containerd.io.
(Reading database … 219566 files and directories currently installed.)
Preparing to unpack …/containerd.io_1.4.3-1_arm64.deb …
Unpacking containerd.io (1.4.3-1) …
Selecting previously unselected package docker-ce-cli.
Preparing to unpack …/docker-ce-cli_5%3a20.10.1~3-0~ubuntu-focal_arm64.deb …
Unpacking docker-ce-cli (5:20.10.1~3-0~ubuntu-focal) …
Selecting previously unselected package docker-ce.
Preparing to unpack …/docker-ce_5%3a20.10.1~3-0~ubuntu-focal_arm64.deb …
Unpacking docker-ce (5:20.10.1~3-0~ubuntu-focal) …
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack …/docker-ce-rootless-extras_5%3a20.10.1~3-0~ubuntu-focal_arm64.deb …
Unpacking docker-ce-rootless-extras (5:20.10.1~3-0~ubuntu-focal) …
Setting up containerd.io (1.4.3-1) …
Setting up docker-ce-cli (5:20.10.1~3-0~ubuntu-focal) …
Setting up docker-ce (5:20.10.1~3-0~ubuntu-focal) …
Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xe” for details.
invoke-rc.d: initscript docker, action “start” failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2020-12-28 22:14:35 UTC; 19ms ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 33834 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 33834 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce (–configure):
installed docker-ce package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of docker-ce-rootless-extras:
docker-ce-rootless-extras depends on docker-ce; however:
Package docker-ce is not configured yet.
dpkg: error processing package docker-ce-rootless-extras (–configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for man-db (2.9.1-1) …
Processing triggers for systemd (245.4-4ubuntu3.3) …
Errors were encountered while processing:
docker-ce
docker-ce-rootless-extras
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@odroid:~# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-12-28 22:14:46 UTC; 13min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 34174 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 34174 (code=exited, status=1/FAILURE)

Dec 28 22:14:46 odroid systemd[1]: docker.service: Scheduled restart job, restart counter is at 4.
Dec 28 22:14:46 odroid systemd[1]: Stopped Docker Application Container Engine.
Dec 28 22:14:46 odroid systemd[1]: docker.service: Start request repeated too quickly.
Dec 28 22:14:46 odroid systemd[1]: docker.service: Failed with result ‘exit-code’.
Dec 28 22:14:46 odroid systemd[1]: Failed to start Docker Application Container Engine.

Any idea to solve this issue will be appreciated. :wink:

TIA

Remove the previously installed packages, then try

curl -sSL https://get.docker.com | sh

root@odroid:~# curl -sSL https://get.docker.com | sh

Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4

  • sh -c apt-get update -qq >/dev/null
  • sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
  • sh -c curl -fsSL “https://download.docker.com/linux/ubuntu/gpg” | apt-key add -qq - >/dev/null
    Warning: apt-key output should not be parsed (stdout is not a terminal)
  • sh -c echo “deb [arch=arm64] https://download.docker.com/linux/ubuntu focal stable” > /etc/apt/sources.list.d/docker.list
  • sh -c apt-get update -qq >/dev/null
  • [ -n ]
  • sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
    E: Sub-process /usr/bin/dpkg returned an error code (1)

I just moved from ubuntu to debian and got the same issues.

Which site are you following to install docker? I see your trying to run the script it doesnt work on all devices. Just install docker like normal.

I would try to remove docker and install the 32bit version of it.

sudo apt-get purge docker-ce docker-ce-cli containerd.io

Then I would add the 32bit version of arm instead of the 64bit repository.

run sudo nano /etc/apt/sources.list
Then remove the 64bit
then ctrl x to save

Then add the 32bit one

sudo add-apt-repository \
   "deb [arch=armhf] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

I used the video from this thread:


and it went flawlessly.
You just have to follow the instructions from storj:
https://documentation.storj.io/setup/cli/storage-node
once docker is install because the video is quite old and a few things have changed.
And do not forget to get the arm version of the docker image and not the x86 ! I got that wrong a few times.

If you’re using focal, note that there isn’t an armhf target for docker-ce for some reason.

From download.docker.com:

image

On my Odroid HC2 nodes, I run Ubuntu 20.04 and just install docker.io from the stock Ubuntu repos. It installs Docker 19.03 which is new enough for running a Storj node. Remove all the docker-ce repos and try installing docker.io.