Friday, March 31, 2017

Tips: Few common Docker commands and tutorials

- Install docker compose
https://docs.docker.com/compose/install/

- List all running containers
docker ps

- List all the running and non-running containers
docker ps -a

- List all images in repository
docker images
or
docker images -a

- Display the logs
docker logs <container_name>

- Display the current running containers
docker ps -q

- Stop all the running containers
docker stop $(docker ps -q)

- Remove the container
docker rm

- Remove the image
docker rmi

- Can't remove container while it's running. You should stop and then remove

- Docker tutorials
https://www.youtube.com/playlist?list=PLkA60AVN3hh_6cAz8TUGtkYbJSL2bdZ4h

- Starting docker compose
docker-compose up -d

- Stopping docker compose
docker-compose down

1 comment:

  1. The docker commands shared are very much useful my sincere thanks for sharing this post please continue to share this kind of post
    Devops Training in Bangalore

    ReplyDelete