Basic Docker Commands | Perfect for beginners

Basic docker commands for beginners

Practice these commands yourself, get your hands dirty check out this Hands On YouTube video demonstrating these commands -

  1. Check Docker Version

2.Check the detailed information of Docker installed

Docker commands — Images

3. Search an image in Docker hub

Note: head command works on bash terminal, for PowerShell terminal in windows use select -first 10

4. Pull and Image from Docker hub

5. Check image history (layers in an image)

6. Pull a specific version of an image

7. Verify Downloaded docker images

8. Remove Docker images

9. Download and run an image in docker container using run command

Docker Commands — Containers

10. List running containers

11. List all containers (This includes containers in all state)

12. Inspect container object

13. Print the stats for a running container

14. Pause a running container

15. Unpause a paused container

16. Kill a running container

17. Start a killed container

18. Stop a running container

19. Delete a container

20. To remove all stopped containers

21. Export a container as an image (.tar file)

22. Import an exported container image (.tar file)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store