Docker installation for ubuntu

Install repository

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

Add Docker’s official GPG key

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"

Update the apt package inde

sudo apt-get update

Install docker-ce

sudo apt-get install docker-ce

Verify that docker is installed

sudo docker run hello-world

Run ubuntu image with bash

sudo docker run -it ubuntu bash

Manage Docker as a non-root user

sudo groupadd docker
sudo usermod -aG docker $USER

Configure Docker to start on boot

sudo systemctl enable docker

To disable this behavior, use disable instead.

sudo systemctl disable docker

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s