Get the App
SLTechnology News&Howtos  ›  Servers  › 

Basic Container Operation of Docker

Shulou Source: shulou.com Published: 2022-06-02 08:12:26 10月05日 Update

< myalpine-latest_with_hello.txt.tar e63a9b4f5484: Loading layer [==================================================>

] 3.584kB/3.584kBLoaded image: myalpine:latest_with_ hello.txt [root @ docker ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEmyalpine latest_with_hello.txt 3ce9b8b899ba 22 minutes ago 5.59MBalpine latest cc0abc535e36 13 days ago 5.59MBzhoumingkang/alpine v3 .10.3 cc0abc535e36 13 days ago 5.59MBalpine 3.9.4 055936d39205 8 months ago 5.53MBhello-world latest fce289e99eb9 12 months ago 1.84kB 11, Container log view [root@docker ~] # docker run hello-world:latest # run a container Hello from docking this message shows that your installation appears to be working correctly.To generate this message Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $docker run-it ubuntu bashShare images, automate workflows, and more with a free Docker ID: https://hub.docker.com/For more examples and ideas Visit: https://docs.docker.com/get-started/[root@docker ~] # docker ps-a | grep-I hello # View the process 1c5c26a209d4 hello-world:latest "/ hello" 12 seconds ago Exited (0) 10 seconds ago angry_ Elliss [root @ docker ~] # docker logs 1c5c26a209d4 # View the log Hello from docking this running by the container Message shows that your installation appears to be working correctly.To generate this message Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $docker run-it ubuntu bashShare images, automate workflows, and more with a free Docker ID: https://hub.docker.com/For more examples and ideas, visit: https://docs.docker.com/get-started/[root@docker ~]

Tags: Container run mirror process name background content command log standard input interactive comment character string form file mode terminal long term Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Information Shulou Technology vpn macOS