Install docker CE on Ubuntu 14.04 (Trusty)

Install Docker CE on Ubuntu 14.04 (Trusty)

1] Uninstall older versions of docker if any.
sudo apt-get remove docker docker-engine docker.io

2] Update the repository
sudo apt-get update

3] Install recommended extra packages for Trusty 14.04
sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual

4] Update apt-get and install packages to allow apt to use a repository over HTTPS
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common

5] Add docker GPG file
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

6] Verify fingerprint
sudo apt-key fingerprint 0EBFCD88

7] Use following commands to setup stable repository. You can also install builds from test and edge repositories.
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

8] Update apt and install docker ce
sudo apt-get update
sudo apt-get install docker-ce

To test if docker has been installed correctly, execute the following command.
sudo docker run hello-world

To list all the docker local container:
docker ps -a

docker-ps

To list latest created container:
docker ps -l

To find out IP address, port and other information of Docker container use inspect command. This will print the JSON structure which contains all the information about the docker container.
docker inspect CONTAINER_ID

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 )

w

Connecting to %s