How to delete the container created in Docker 1. First, use the docker -s -a command to list all containers # docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f2582758af13 ubuntu "/bin/bash" 2 hours ago Up 2 hours first_ubuntu 6b5b5a969241 centos "/bin/bash" 2 days ago Exited (0) 24 hours ago ubuntu-web 2. Then use the docker stop command to stop the container to be deleted docker stop <CONTAINER ID|NAME> 3. Now remove single or multiple containers using the following command. docker rm <CONTAINER ID|NAME> <CONTAINER ID|NAME> Note: You can also use the following command to remove all stopped containers at once. docker rm $(docker ps -a -q) Content extension: If your docker-registry is in a container, you cannot use commands to delete the image and can only delete the image file manually. If not, you can use docker rmi image name to delete it Docker is a platform for developers and system administrators to develop, migrate, and run applications. After the application is packaged into a Docker Image through Docker, it can be downloaded, started, expanded, deleted, and migrated in a unified way, which facilitates the deployment and operation and maintenance of the application. Docker uses a server/client model. The Docker client creates, runs, or deploys Docker containers by interacting with the Docker Daemon. Users can install the Docker client and Docker Daemon on the same system or on different systems. The Docker client communicates with the Docker Daemon through ports or RESTful APIs. Docker internally consists of three parts: Docker images: A Docker image is a read-only template used to create a Docker container. The image can contain a Linux operating system, Apache or a Web application, etc. Users can download already created Docker images or create Docker images for other users. Each image is composed of many layers, and Docker binds these layers into one image through Union File Systems. Each image is based on a primary image, and then new layers are added to these primary images through operation instructions. Operation instructions can be commands to run, files or directories to add, or create a usable operating environment. These operation instructions are saved in the "Dockerfile" file. Docker registries: Docker registries are used to store Docker images, which are also divided into public and private types. The public Docker registry is Docker Hub. Users can also create private Docker registries to provide Docker images for other users to download. Docker containers: Similar to directories that store VMware virtual machine configuration files, they provide everything needed to run an application. Docker Containers can be run, started, stopped, or deleted, and each container is an isolated and secure application platform. This is the end of this article about how to delete the container created in docker. For more information about how to delete the container created in docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: The easiest way to create a new user and grant permissions to MySQL
Table of contents Overview The history of CPU-bou...
Table of contents use Use of EsLint Add a profile...
Adaptive layout is becoming more and more common i...
Solution-1: Download the msvcr100.dll file (find ...
Table of contents 1. What are microtasks? 2. What...
I installed MySQL smoothly in Ubuntu 16.04 before...
Click here to return to the 123WORDPRESS.COM HTML ...
Prerequisite: Percona 5.6 version, transaction is...
Transactions in MySQL are automatically committed...
Preface: Because many business tables use design ...
1. Location regular expression Let's take a l...
Table of contents Technology Stack Backend build ...
An interesting discovery: There is a table with a...
This article records the detailed process of down...
Because the docker daemon needs to bind to the ho...