Thursday, March 14, 2019


List of Top Docker Commands in Linux

Docker works just like Git.

you have to always take a pull for latest image.

****************************** Docker install ******************

sudo apt-get update
sudo apt-get install

**************************** Check docker installed or not *************

docker ps -a

************************* Login to AWS container via command line ************

 $(aws ecr get-login --no-include-email --region us-east-1)
[--registry-ids <value> [<value>...]]
[--include-email | --no-include-email]

**************************** pull the docker image *************

docker pull

************************** Docker push image **************************************

-> commit your changes first

docker commit <your-container-name> (v2.2 is the tagging  version)

-> Now run push command

docker push

you can check your latest push on server [aws/ECR/Repository/click on your repository]

*********************************** Create container with in docker *********************

docker run -it --restart always --net=subnet15 --hostname=<your-container-name> --name <your-container-name>

**************************** Enter into docker container *************

-> docker exec -it <docker-container-name> bash

-> docker attach <docker-container-name>

****************************** To check docker container *******
-> docker ps

-> su md (switch to md user)

*************************** Check all cron in docker *****
crontab -e

******************** Install library into lib folder ***********************
pip3 install name -t . (within your python library path)

*************************** List Docker CLI commands **************
docker container --help

*************** Display Docker version and info *************
docker --version
docker version
docker info

************ Execute Docker image **********
docker run hello-world

******************* List Docker images ***************
docker image ls

******************* List Docker containers (running, all, all in quiet mode) *****************
docker container ls
docker container ls --all
docker container ls -aq

************************* list docker all container*********************
docker container ls -a

About Author -

Hi, I am Anil.

Welcome to my eponymous blog! I am passionate about web programming. Here you will find a huge information on web development, web design, PHP, Python, Digital Marketing and Latest technology.

Subscribe to this Blog via Email :