
1. Start the docker service first
systemctl start docker
2. Pull a pure centos system image from the remote warehouse
Query centos related images
docker search centos
3. Download the image to the local
docker pull 镜像名
4. View the local image
docker images
5. Create and enter the container
Format:
docker run -dit --name=容器名 镜像 id /bin/bash

6. View all containers
docker ps -a
7. Operate containers
Install the environment in the container. What I installed here is python3

8. After installing the environment, exit the container
Use exit to exit the container
9. Make the container into a mirror format
:
docker commit -m '镜像描述' -a '制作者' 容器名 镜像名
Recommended related tutorials:docker tutorial
The above is the detailed content of How to make docker image. For more information, please follow other related articles on the PHP Chinese website!
The difference between k8s and docker
What are the methods for docker to enter the container?
What should I do if the docker container cannot access the external network?
What is the use of docker image?
How to restart regularly
Where should I fill in my place of birth: province, city or county?
Windows cannot access the specified device path or file solution
Digital currency trading platform