Tuesday, December 20, 2016

How to install Docker on Ubuntu 16.04

Docker is very popular tool for containerization, docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server.

Installing docker on ubuntu is pretty simple, all you need to do is install package called docker.io (there is also package on ubuntu called docker, but docker and docker.io is totally different thing).

sudo apt-get install docker.io
Docker is a command line based application, so don't expect any graphical interface, when you work with docker, you work in totally command line mode.

Keep in mind that you need to run docker with sudo command, i dont know why but this is what happened to me, if i run docker command without sudo i will get error message 'Cannot connect to the Docker daemon. Is the docker daemon running on this host?'.

If you run docker command without any parameter, you will get list of available command parameter that you can use with docker. Here's list of some docker commands:
docker command what for?
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
start Start one or more stopped containers
stop Stop one or more running containers
images List images
load Load an image from a tar archive or STDIN
create Create a new container

No comments:

Post a Comment