docker -v
sudo docker images
saalimmushtaq/gcc-4.9:1
saalimmushtaq is the name of the repository,gcc-4.9 is the name of the image,1 is the image tag
sudo service docker start
sudo docker ps
sudo docker search imagename
sudo docker ps -a
sudo docker pull imagename
sudo docker run -it --name contname imagename /bin/bash
sudo service docker start
sudo docker start containername
sudo docker attach containername
sudo docker stop containername
docker rm containername
sudo docker build -t myimage .
sudo docker run -it --name containername imagename /bin/bash
sudo docker commit containername imagename
sudo cat /etc/os-release
sudo docker run -it --name containername2 --privileged=true --volumes from containername1
~sudo docker volume prune~
sudo docker push dockerid/imagename
sudo docker pull dockerid/imagename
sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
sudo docker rm -f $(docker images -q)
sudo docker run -it -v $PWD:$PWD -w $PWD saalimmushtaq/gcc-4.8:2
-v flag is used to mount a host folder, -w indicates working directory
this image must be on top of the dockerfile
to execute commands,it will create a layer in image
to set working directory for a container
copy files from a local sytem,we need to provide source and destination
similar to copy but it provides a feature to download files from internet
to expose ports
execute command
environment variable