Wednesday, May 29, 2019

Configuration - setting up Docker for Ubuntu 19.04

A friend of mine installed fresh Ubuntu 19.04 for which there is no stable docker yet. So we had to do it a slightly more complicated way.  

NOTE: this configuration does not help with running docker over VPN
NOTE: Some of the commands below may require sudo
NOTE: It is assumed that you configure docker for user without sudo, cause using it with sudo does not quite make sense

First, we had to add a GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Then we had to configure docker repositories:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge test"
NOTE: we had to use 'stable edge test' cause 'stable edge' didn't work out 
NOTE: if you are not installing for the somewhat raw Ubuntu 19.04, you'll be fine with the repos from the official installation guide: LINK
 
After that we updated with the newly added repo data:
apt-get update
apt-cache policy docker-ce

And installed the docker:
apt-get install -y docker-ce

We couldn't get it up and running with just adding a user to the docker group:
usermod -aG docker username
id -nG

So we had to configure ACL:
setfacl -m user:username:rw /var/run/docker.sock

We checked if the service is running without errors:
systemctl status docker 

And did initial health check:
docker run hello-world

Enjoy your docker.

Sources I used:
LINK
LINK
+ official docker tutorial: LINK

No comments:

Post a Comment