Simple docker commands: for your every day reference

Lately I am looking to docker related things and started off with few things. Thought of sharing it as it might be useful for any new comer who is looking for a way to start

Please note the following steps were tried in ubuntu 16.04

Installing docker :

sudo apt-get install

Giving permission for your user to use docker functionalities:

Normally all the docker related functionality is enabled for the “root” user. But using the super user might pose security threats. Hence it’s advicable to add your relevant user to the docker group. By adding the user to the docker group, that user will also get the ability to invoke docker related commands.

Create docker group if it doesn’t exist:

sudo groupadd docker

Add the logged in user to the docker group:

sudo usermod -aG docker $USER

After this you are ready to use docker.

Some other useful commands when using docker:

docker images — list all images currently there in your local repository

docker tag <source docker image name:tag | image id> <new docker image name:tag> — Will rename an existing docker image

docker push <docker image name:tag> — Will push docker image to a remote repository

docker pull <docker image name:tag> — Will pull docker image to the local repo from a remote repository

And much more….. Refer docker docs for more information on using docker.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.