Install Docker on Ubuntu 18.04? [closed] - docker

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 2 years ago.
Improve this question
I checked the documentation page for Docker on Ubuntu and I don't see 18.04, which was released recently.
https://docs.docker.com/install/linux/docker-ce/ubuntu/
Anyone installed docker on 18.04?
UPDATE: the docker documentation has been updated now and includes 18.04

Following link https://download.docker.com/linux/ubuntu/dists/bionic/pool/,
You can choose stable now.
$ sudo cat /etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

The easiest way to install Docker is via Ubuntu image repository:
sudo apt install docker.io
Restart your computer, then do:
systemctl start docker
systemctl enable docker
https://www.howtoforge.com/tutorial/ubuntu-docker/

You can install docker using one simple command:
curl -fsSL https://get.docker.com | sh
Works not only on ubuntu but on all platforms supported by docker (kinda)

Create an apt source-list file with the following content:
/etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic nightly
Update repositories and install the docker engine:
sudo apt update
sudo apt install docker-ce
You can use stable instead of nightly in the deb declaration of the apt source file as soon as it becomes available.

I followed the installation guide Get Docker CE for Ubuntu
and in step 4 I added the edge repository:
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
edge"

Since, I was not able to install community edition of docker by ading the edge repository (add-apt-repository). Hence, I had to install using the deb files.
In order to install docker community edition on Ubuntu Bionic - I used the following steps.
Step 1: Download the .deb files using the wget utility:
wget -c https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb
wget -c https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_19.03.1~3-0~ubuntu-bionic_amd64.deb
wget -c https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.1~3-0~ubuntu-bionic_amd64.deb
Step 2: Now Install the downloaded files using dpkg utility:
sudo dpkg -i containerd.io_1.2.6-3_amd64.deb
sudo dpkg -i docker-ce-cli_19.03.1~3-0~ubuntu-bionic_amd64.deb
sudo dpkg -i docker-ce_19.03.1~3-0~ubuntu-bionic_amd64.deb
References:
https://docs.docker.com/install/linux/docker-ce/ubuntu/
Stable Repositories of Docker for Ubuntu Bionic are available at:
https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/

18.04 was not a stable release but an Edge releases. Switch to the edge channel.
Edit: sorry, you mean Ubuntu 18.04, not Docker 18.04
Maybe this helps: https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver

You now have three clean options:
a standard Ubuntu package: docker.io
a snap package from Docker Inc which has some restrictions on where your Dockerfile is, and is 5 months more out-of-date than the Ubuntu package, but works on more Linux distros
the official docker-ce package from Docker Inc, which requires their private repo and more install steps
For more helpful instructions, details and references, see askubuntu: Docker-CE or docker.io package

Here is how you can install Docker CE on Ubuntu 18.04:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
sudo apt update sudo apt install docker-ce
Now, check the installed version using this command:
docker -v

Related

Adding the most recent stable Docker repository path in Ubuntu Bionic Beaver

After following steps 1 - 3 from the official docker engine install steps for Ubuntu (updating apt packages, adding Docker’s official GPG key, and applying the command to set up the repository) I get a problem when installing the plugins for the docker engine:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Based on an answer here, it resolves this issue, however I do not understand this option lsb_release -cs in the add-apt-repository command that was used.
The docker bionic repos can be viewed here.
Based on the repo path and name from that link, would this mean that the following command is correct to add the the most recent stable docker repository?
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu/dists/bionic/stable/binary-amd64/Release"
I'm not fully sure about how this command operates, and how the options are correctly given. It doesn't make sense to me why they haven't included this in the official docker engine install steps.
Based on surmise (unfortunately), and dissecting the official command to set up the repository, this will work:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` stable"
To summarize, this will solve the docker ce installation problem on Ubuntu 18.04 LTS (Bionic Beaver)
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` stable"
sudo apt update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

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

How to install Docker in Ubuntu offline

I need to install Docker in an Ubuntu 18 machine which do not have any internet access. There are plethora of instruction material exist on this this subject but all they require Ubuntu machine to be online.
Any help on offline installation of Docker will be highly helpful.
Thanks,
On any machine with internet access, do the following:
Go to https://download.docker.com/linux/ubuntu/dists
Choose your Ubuntu distribution (For 18.0.4 it would be beaver/)
Navigate to pool/stable/<processor architecture>
Download the most recent version of each package
After transferring the .deb files to your offline Ubuntu machine/VM:
In a terminal, navigate to the folder which contains your .deb files
Execute dpkg -i <package1> <package2> <package3> in order to install the downloaded packages
Verify that the service is running by switching to /opt/ and executing systemctl status docker.service
After this you should be able to configure your docker installation and import packages via the docker load command
Run these commands:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` test"
sudo apt update
sudo apt install docker-ce

Installation of neo4j on ubuntu 14.04 fails

I am attempting to install neo4j in ubuntu 14.04 as specified in http://neo4j.com/docs/operations-manual/current/installation/linux/debian/?_ga=2.249168388.2041192375.1507250087-893468657.1507250087
The installation instruction I am using is
sudo apt-get install neo4j=3.2.3
but it doesn't work
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package neo4j
I'd apreciate any help
Maybe you forgot to add the debian repository and to update your list of packages:
wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
echo 'deb https://debian.neo4j.org/repo stable/' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt-get update
https://neo4j.com/docs/operations-manual/current/installation/linux/debian/#debian-add-repository
I had the same problem on Debian and installing "apt-transport-https" fixed it because deb https://debian.neo4j.org/repo stable/ is using https.
You can install it with this:
sudo apt install apt-transport-https

Ubuntu 16.10 : get recent docker & docker compose version?

I'm looking to use Docker compose with v2 docker-compose.yml syntax.
When I'm following the documentation (https://store.docker.com/editions/community/docker-ce-server-ubuntu?tab=description) old docker and docker-compose version has installed :
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt install docker docker-compose
.../...
$ dpkg -l |grep docker
ii docker 1.5-1 amd64 System tray for KDE3/GNOME2 docklet applications
rc docker-ce 17.03.1~ce-0~ubuntu-yakkety amd64 Docker: the open-source application container engine
ii docker-compose 1.5.2-1 all Punctual, lightweight development environments using Docker
ii docker.io 1.12.6-0ubuntu1~16.10.1 amd64 Linux container runtime
ii python-docker 1.8.0-0ubuntu1 all Python wrapper to access docker.io's control socket
ii python-dockerpty 0.4.1-1 all Pseudo-tty handler for docker Python client (Python 2.x)
In order to use version 2 docker compose file format I need more recent version.
Documentation page of Docker Compose : https://github.com/docker/docker.github.io/blob/master/compose/compose-file/compose-versioning.md
Version 2 files are supported by Compose 1.6.0+ and require a Docker
Engine of version 1.10.0+.
How do I get recent version of docker engine & docker compose ?
I googled this many times today without fine any "simple" solution.
My system : Ubuntu 16.10
Thanks for your help,
David
The easiest way to install Docker is to run:
curl -sSL https://get.docker.com/ | sh
You will probably need to run apt-get remove docker docker-compose first.
To install docker-compose, I normally grab the latest release from the docker-compose Github project e.g:
curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Resources