Home > Article > Operation and Maintenance > How to make docker image
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!