Reference Docker Install Docker Compose Installation
sample file Dockerfile
sample file Docker Compose
docker search
docker tag hello-world:latest aws_account_id.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest
docker push aws_account_id.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest
aws ecr get-login-password --region region | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com
docker pull ubuntu
- Pull the ubuntu image from dockerhub
docker images ls
docker container ls -a
- a - List all containers, without the flag it only shows active containers
docker rmi image_name or ID number
docker container prune
docker container start container_id
docker build -t image_name .
- t - name you wish to give the container
docker run -d --name container_name -p 80:80 image_name
- d -
- name - give container name or a default one will be created
- p - assign port mapping first is host second is container port
- it - interactive terminal
- --network - specify network for container to run on
- v - map directory from host to container
docker exec -it container_id bash