### Docker basic command - docker pull ```shell= sudo docker pull busybox ``` Pull the Busybox repository from **Docker registry** to our local system. ![](https://i.imgur.com/RU0IX1x.png) - docker images ```shell= sudo docker images ``` List all images saved on the local system. ![](https://i.imgur.com/wq7WHqK.png) - docker run busybox ```shell= sudo docker run busybox ``` You may find that nothing happens after sending the command. What is going on? Well... the busybox container has actually been started, and commands are run inside the container. But we did not issue a command to the container, so it exited. - docker ps ```shell= sudo docker ps -a ``` Show your containers currently running, append "-a" to list all containers. ![](https://i.imgur.com/t2KQFlt.png) You can found the status of container - "Exited". --- #### Practice more: ```shell= sudo docker run busybox echo "2021/08/09" ``` Here we give the busybox container the command "echo". As expected, we will get the output. *Because the above experiments are all one-offs, what if we want to interact with the container?* ```shell= sudo docker run -it busybox sh ``` ![](https://i.imgur.com/j6CxwQW.png) Now, you can do lots of things within this container. [P.s] This container is just a busybox, so its environment cannot do any complicated applications. We will talk more about how to build applications using Linux mirroring. --- @ docker for devops series - 1 ###### tags: `CY`