Update docker on Debian 10 - docker

I try to update docker on Debian, with the following command:
sudo apt-get update --allow-releaseinfo-change
But I got the following error message:
Hit:1 http://asi-fs-n.contabo.net/debian buster InRelease
Hit:2 http://asi-fs-n.contabo.net/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Get:4 https://download.docker.com/linux/debian buster InRelease [54.0 kB]
Hit:5 https://download.docker.com/linux/ubuntu zesty InRelease
Ign:6 https://download.docker.com/linux/ubuntu docker InRelease
Err:7 https://download.docker.com/linux/ubuntu docker Release
404 Not Found [IP: 13.224.94.87 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu docker Release' does not have a Release file.
N: Updating from such a repository can't be done securely and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
From another StackOverflow topic, it seems I must update the file /etc/apt/sources.list.d/docker.list
I tried the following (but it does not work):
deb https://get.docker.io/ubuntu docker main
Noticed that:
I use Debian 10
The following command print "buster" : https://download.docker.com/linux/debian
Should I change to something like, without corrupting/breaking my operating system?
deb https://download.docker.com/linux/debian docker buster

See Install Docker Engine on Debian. Use the following commands:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" |\
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
The first command will download the gpg key, the second one will adjust your docker.list file.
Then run sudo apt update

Create the following file:
$ cat /etc/apt/sources.list.d/docker-ce.list
deb [arch=amd64] https://download.docker.com/linux/debian buster stable
Then remove any other download.docker.com entries in /etc/apt/sources.list or /etc/apt/sources.list.d/*

I had a similar issue on a VM once. The repo for "https://download.docker.com/linux/ubuntu docker" does not exist and needs to be removed. Unsure why it's there.
This worked for me:
open the source list (providing there isn't external source lists):
sudo nano /etc/apt/sources.list
remove any lines for "ubuntu" as you are on Debian 10 and save
run sudo apt-get update

Related

Ubuntu 22.04 cannot install docker, error during apt-get update [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
Improve this question
These are the steps that I did:
$ sudo apt-get update
$ sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
$ sudo mkdir -p /etc/apt/keyrings
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
$ echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
This is the terminal log (the error is here):
$ sudo apt-get update
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://id.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://id.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://id.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:5 https://download.docker.com/linux/debian jammy InRelease
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Err:7 https://download.docker.com/linux/debian jammy Release
404 Not Found [IP: 108.138.141.89 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
but if we look at https://download.docker.com/linux/ubuntu/dists/jammy/ it's obviously has the Jammy Release file, i'm not sure what's wrong with it.
My system info:
.-/+oossssoo+/-. tonysong#tonysong-desktop
`:+ssssssssssssssssss+:` -------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Kernel: 5.15.0-39-generic
/ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 29 mins
+ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 1591 (dpkg), 11 (snap)
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 5.1.16
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Resolution: 2560x1440
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ DE: GNOME 42.1
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM Theme: Adwaita
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Theme: Yaru-blue-dark [GTK2/3]
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Icons: Yaru-blue [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Terminal: gnome-terminal
+sssssssssdmydMMMMMMMMddddyssssssss+ CPU: AMD Ryzen 7 5700G with Radeon Graphics (16) # 4.673GH
/ssssssssssshdmNNNNmyNMMMMhssssss/ GPU: AMD ATI 04:00.0 Cezanne
.ossssssssssssssssssdMMMNysssso. Memory: 5179MiB / 31477MiB
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
Why do you using debian in https://download.docker.com/linux/debian/gpg URL (and echo command)?
It is should be ubuntu: https://download.docker.com/linux/ubuntu/...
Please re-check documentation.
but if we look at https://download.docker.com/linux/ubuntu/dists/jammy/ it's obviously has the Jammy Release file, i'm not sure what's wrong with it.
Yep, if we look it is .../linux/ubuntu/...

docker installation failed on Ubuntu 20.04 LTS(Vmware) [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
The community reviewed whether to reopen this question 5 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am following the docker installation on Ubuntu 20.04 using https://docs.docker.com/engine/install/ubuntu/ in Ubuntu VM on VMware.
But when running the command to add the repository to Ubuntu.
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
I am getting below error
Get:1 http://us.archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable Release
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:6 https://download.docker.com/linux/ubuntu focal InRelease
Err:7 https://download.docker.com/linux/ubuntu focal Release
404 Not Found [IP: 13.225.7.126 443]
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [89.1 kB]
Hit:9 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
when running command
sudo apt-get install docker-ce docker-ce-cli containerd.io
I get error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
What is the reason for this?
I am new to docker.
Is there a workaround to this or should I install docker using source code or something?
Thank you.
For the moment, you can use :
sudo apt-get install -y docker.io
And then check with :
docker -v
According to the documentation followed by a test on my PC, these instructions will install docker successfully on WMware Ubuntu focal:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Docker has not released the repository for focal fossa (20.04) yet. As #Wared said, running
sudo apt install -y docker.io
will get docker from ubuntu repository.
I am able to use all my docker images that I used to in 18.04 successfully on 20.04 with this docker installation.
I know the question is about Ubuntu 20. But in case you are trying to install it on Linux Mint 20 (like me), the problem looks the same but the answer is different.
The installation guide tells you to add the PPA like this:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
However, the $(lsb_release -cs) part is the problem, because it passes the release name as a parameter to the repository command. In Ubuntu 20 that command outputs focal and everything goes well, but in Linux Mint that command outputs ulyana and it fails because docker does not have that release.
If you want to install it on mint, just replace that command with the focal string so you get the ubuntu focal version:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
focal \
stable"
According to the information at https://docs.docker.com/engine/install/ubuntu/ Ubuntu 20.04 is not supported at the moment.
The docker repositories for Ubuntu 20.04 LTS arent ready yet (I dont understand why they didnt concentrate on that instead of getting out a version for non LTS releases like 19.10!).
But the version that is already available in the Ubuntu Universe repository is recent, so just use this in the meantime.
When the guys at Docker are ready to publish their 20.04 repo, just follow this instruction: https://docs.docker.com/engine/install/ubuntu/
..then, of course also including the section "Uninstalling old versions". This way, you can already start to use Docker on Ubuntu 20.04
The above error occurs due to unclean copy of the commands. Please consider this and copy the command once again to resolve the error. It helped me rectify the same error.
This is what solved my problem:
dpkg -i --ignore-depends=docker-ce lando-stable.deb
FROM https://docs.lando.dev/getting-started/installation.html#caveats

Docker packages for stretch release failing to be found on sudo apt-get update

I've added the repository as per the tutorial https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
but when I run sudo apt-get update I get the following stack
Ign:9 https://download.docker.com/linux/ubuntu stretch/stable amd64 Packages
Ign:10 https://download.docker.com/linux/ubuntu stretch/stable all Packages
Ign:12 https://download.docker.com/linux/ubuntu stretch/stable Translation-en
Ign:13 https://download.docker.com/linux/ubuntu stretch/stable Translation-en_US
Err:9 https://download.docker.com/linux/ubuntu stretch/stable amd64 Packages
404 Not Found
Ign:10 https://download.docker.com/linux/ubuntu stretch/stable all Packages
Ign:12 https://download.docker.com/linux/ubuntu stretch/stable Translation-en
Ign:13 https://download.docker.com/linux/ubuntu stretch/stable Translation-en_US
Reading package lists... Done
W: The repository 'https://download.docker.com/linux/ubuntu stretch Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/stretch/stable/binary-amd64/Packages 404 Not Found`
My /etc/apt/sources.list is as follow
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb [arch=amd64] https://download.docker.com/linux/ubuntu stretch stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu stretch stable
Ubuntu doesn't have stretch. You probably clicked on the wrong link on the docs. Replace ubuntu in the sources.list file URL with debian, as you seem to be on a debian machine.

Docker Packages: Hash Sum Mismatch

I am getting the following error while doing apt-get update (Ubuntu 14.04)
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Fetched 3156 kB in 15s (201 kB/s)
W: **Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-trusty/main/binary-amd64/Packages Hash Sum mismatch**
E: Some index files failed to download. They have been ignored, or old ones used instead.
Did you add the gpg key of docker repo?
From the official doc:
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
This is a known bug in docker currently, see here.
There are a few workarounds listed in that thread, depending on where you are hitting this problem (travis CI is different than locally).
The chosen solution didn't work for me. And I noticed that this isn't always the case - that is, if I wait a day or two, I don't get the error. I suspect it has more to do with the ubuntu repositories than the version of docker we use (as explained by Robie).
My solution is to use one of the official mirrors instead of the default ubuntu repo. Replace xenial with your ubuntu version. You might need an extra deb-src line for all or none of the lines depending on where you are getting the mismatch. I noticed that the mirrors are slower compared to the default.
RUN rm -rf /etc/apt/sources.list
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb-src mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse" >> /etc/apt/sources.list

docker command not found even though installed with apt-get

Adding this for reference for others because it would have saved me 10 minutes if such an answer existed.
I tried installing Docker using ubuntu 14.0LTS virtualbox
sudo apt get install docker
However, when I try running docker it gives me the following error
The program 'docker' is currently not installed. You can install it by typing:
sudo apt-get install docker
Why is ubuntu not seeing docker?
The Ubuntu package docker actually refers to a GUI application, not the beloved DevOps tool we've come out to look for.
The instructions for docker can be followed per instructions on the docker page here: https://docs.docker.com/engine/install/ubuntu/
=== UPDATED (thanks #Scott Stensland) ===
You now run the following install script to get docker:
curl -sSL https://get.docker.com/ | sudo sh
Note: review the script on the website and make sure you have the right link before continuing since you are running this as sudo.
This will run a script that installs docker. Note the last part of the script:
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker stens
Remember that you will have to log out and back in for this to take effect!
To update Docker run:
sudo apt-get update && sudo apt-get upgrade
For more details on what's going on,
See the docker install documentation or #Scott Stensland's answer below
.
=== UPDATE: For those uncomfortable w/ sudo | sh ===
Some in the comments have mentioned that it a risk to run an arbitrary script as sudo. The above option is a convenience script from docker to make the task simple. However, for those that are security-focused but don't want to read the script you can do the following:
Add Dependencies
sudo apt-get update; \
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
Add docker gpg key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
(Security check, verify key fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
$ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker#docker.com>
sub rsa4096 2017-02-22 [S]
)
Setup Repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Install Docker
sudo apt-get update; \
sudo apt-get install docker-ce docker-ce-cli containerd.io
If you want to verify that it worked run:
sudo docker run hello-world
The following explains why it is named like this:
Why install docker on ubuntu should be `sudo apt-get install docker.io`?
IMPORTANT - ubuntu package docker is something entirely different ( avoid it ) :
issue following to view what if any packages you have mentioning docker
dpkg -l|grep docker
if only match is following then you do NOT have docker installed below is an unrelated package
docker - System tray for KDE3/GNOME2 docklet applications
if you do see above lets remove it since its the wrong docker
sudo apt-get remove docker # remove the wrong docker
if you see something similar to following then you have docker installed
dpkg -l|grep docker
ii docker-ce 5:19.03.13~3-0~ubuntu-focal amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:19.03.13~3-0~ubuntu-focal amd64 Docker CLI: the open-source application container engine
NOTE - ubuntu package docker.io is not getting updates ( obsolete do NOT use )
Instead do this : install the latest version of docker on linux by executing the following:
sudo apt-get install docker-ce
below is yet another way to issue the install command
sudo curl -sSL https://get.docker.com/ | sh
# sudo curl -sSL https://test.docker.com | sh # get dev pipeline version
here is a typical output ( ubuntu 16.04 )
apparmor is enabled in the kernel and apparmor utils were already installed
+ sudo -E sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: /tmp/tmp.rAAGu0P85R/gpg.1.sh --keyserver
hkp://ha.pool.sks-keyservers.net:80
--recv-keys
58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
gpg: key 2C52609D: "Docker Release Tool (releasedocker) <docker#docker.com>" 1 new signature
gpg: Total number processed: 1
gpg: new signatures: 1
+ break
+ sudo -E sh -c apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D >/dev/null
+ sudo -E sh -c mkdir -p /etc/apt/sources.list.d
+ dpkg --print-architecture
+ sudo -E sh -c echo deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c sleep 3; apt-get update; apt-get install -y -q docker-engine
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://download.virtualbox.org/virtualbox/debian xenial InRelease
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:5 http://archive.canonical.com/ubuntu xenial InRelease
Hit:6 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial InRelease
Hit:7 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial-updates InRelease
Hit:8 http://ppa.launchpad.net/me-davidsansome/clementine/ubuntu xenial InRelease
Ign:9 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease
Hit:10 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial-backports InRelease
Hit:11 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release
Hit:12 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial-security InRelease
Hit:14 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease
Ign:15 http://linux.dropbox.com/ubuntu wily InRelease
Ign:16 http://repo.vivaldi.com/stable/deb stable InRelease
Hit:17 http://repo.vivaldi.com/stable/deb stable Release
Get:18 http://linux.dropbox.com/ubuntu wily Release [6,596 B]
Get:19 https://apt.dockerproject.org/repo ubuntu-xenial InRelease [20.6 kB]
Ign:20 http://packages.amplify.nginx.com/ubuntu xenial InRelease
Hit:22 http://packages.amplify.nginx.com/ubuntu xenial Release
Hit:23 https://deb.opera.com/opera-beta stable InRelease
Hit:26 https://deb.opera.com/opera-developer stable InRelease
Get:28 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages [1,719 B]
Hit:29 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 28.9 kB in 1s (17.2 kB/s)
Reading package lists... Done
W: http://repo.mongodb.org/apt/debian/dists/wheezy/mongodb-org/3.2/Release.gpg: Signature by key 42F3E95A2C4F08279C4960ADD68FA50FEA312927 uses weak digest algorithm (SHA1)
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
aufs-tools cgroupfs-mount
The following NEW packages will be installed:
aufs-tools cgroupfs-mount docker-engine
0 upgraded, 3 newly installed, 0 to remove and 17 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 73.7 MB of additional disk space will be used.
Get:1 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB]
Get:2 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B]
Get:3 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 docker-engine amd64 1.11.2-0~xenial [14.5 MB]
Fetched 14.6 MB in 7s (2,047 kB/s)
Selecting previously unselected package aufs-tools.
(Reading database ... 427978 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package docker-engine.
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu6) ...
Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up docker-engine (1.11.2-0~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
+ sudo -E sh -c docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker stens
Remember that you will have to log out and back in for this to take effect!
Here is the underlying detailed install instructions which as you can see comes bundled into above technique ... Above one liner gives you same as :
https://docs.docker.com/engine/installation/linux/ubuntulinux/
Once installed you can see what docker packages were installed by issuing
dpkg -l|grep docker
ii docker-ce 5:19.03.13~3-0~ubuntu-focal amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:19.03.13~3-0~ubuntu-focal amd64 Docker CLI: the open-source application container engine
now Docker updates will get installed going forward when you issue
sudo apt-get update
sudo apt-get upgrade
take a look at
ls -latr /etc/apt/sources.list.d/*docker*
-rw-r--r-- 1 root root 202 Jun 23 10:01 /etc/apt/sources.list.d/docker.list.save
-rw-r--r-- 1 root root 71 Jul 4 11:32 /etc/apt/sources.list.d/docker.list
cat /etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main
or more generally
cd /etc/apt
grep -r docker *
sources.list.d/docker.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu focal test
sudo apt-get install docker # DO NOT do this
is a different library on ubuntu.
Use sudo apt-get install docker-ce to install the correct docker.
If you want to install docker in an easy way.
Just type:
$sudo apt install docker.io
And, it will start installing.
And, to check whether its working or not type:
$docker
SET UP THE REPOSITORY
For Ubuntu 14.04/16.04/16.10/17.04:
sudo add-apt-repository "deb [arch=amd64] \
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
For Ubuntu 17.10:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Then install
$ sudo apt-get update && sudo apt-get -y install docker-ce

Resources