Athulya Raj Profile picture
Engineer

Mar 28, 2023, 16 tweets

#docker CLI commands through #Memes. 🧵
1. Publish an image to Docker Hub
docker push <username>/<image_name>

2.Pull an image from a Docker Hub
docker pull <image_name>

3. Search Hub for an image
docker search <image_name>

4. Build an Image from a Dockerfile
docker build -t <image_name>

5. Delete an Image
docker rmi <image_name>

6. Remove all unused images
docker image prune

7. Run a container with and publish a container’s port(s) to the host.
docker run -p <host_port>:<container_port> <image_name>

8. Stop an existing container:
docker stop <container_name> (or <container-id>)

9. Start an existing container:
docker start <container_name> (or <container-id>)

10. Remove a stopped container:
docker rm <container_name>

11. Fetch and follow the logs of a container:
docker logs -f <container_name>

12. To inspect a running container:
docker inspect <container_name> (or <container_id>)

13. To list currently running containers:
docker ps

14. View resource usage stats
docker container stats

15. Get help with Docker.
docker --help

16. Display system-wide information
docker info

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling