Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basic ways to use docker

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report