check docker version
docker -v
pull image from docker host
docker pull image_name
Run nginx with configure website.
docker run --name website -v $(pwd):/usr/share/nginx/html:ro -d -p 8000:80 nginx
run container with tag
docker run nginx:lastest
run container with tag and in background and port number
docker run -d -p 8080:80 nginx:lastest
stop docker container
docker stop port_number
List all container
docker ps -a
List all container only id
docker ps -aq
remove container by id
docker rm container_id
remove all containers
docker rm $(docker ps -aq)
remove all containers by forcing
docker rm -f $(docker ps -aq)
run container with name
docker run ---name name -d -p 3000:80 nginx:lastest