Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the basic ways to use docker

Shulou Source: shulou.com Published: 2022-05-31 20:22:52 09月22日 Update

This article mainly explains "what are the basic uses of docker". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the basic ways to use docker?"

$docker ps / / View all running containers

$docker stop containerId / / containerId is the ID of the container

$docker ps-a / / View all containers

$docker ps-a-Q / / View all container ID

$docker stop $(docker ps-a-Q) / / stop stops all containers

$docker rm $(docker ps-a-Q) / / remove Delete all containers that are running cannot be deleted. You need to stop the container first.

Docker images View Mirror

Docker rmi Delete Mirror

Docker build-t XXX. Add at the end. It's easy to ignore.

Docker run-- name=XXXXX-- net=host-p 8095 XXXX boot container-- net=host add host host address or localhost will report an error

Docker logs-f-t-- tail 1000 containerId / / containerId is the ID view log of the container

At this point, I believe you have a deeper understanding of "what is the basic use of docker?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Container method method of use content being mirroring learning running practical deeper interest address practicality practical host easy to operate log more friends website Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Xiaomi Huawei OPPO Reno MySQL