1. CentOS version
docker requires that the kernel version of CentOS system is higher than 3.10, and view the version through uname – R
2. Upgrade package kernel (optional)
Yum update
3. Install docker
Yum install docker
4. Start docker
sudo service docker start
5. Set the docker service to boot
systemctl enable docker
6. Remove the docker from the boot entry
systemctl stop docker
7. Search docker image (docker search keyword)
docker search redis
8. Pull the image file
docker pull image name: tag (tag is optional, the default is latest)
9. View the downloaded image
docker images
10. Delete the image
docker RMI image ID (container ID)
11. Run the docker container (- D: running in the background)
docker – run – name custom container name – D specifies the image templateļ¼ imageName:tag , if tag is latest, it can be omitted.)
12. View running containers (add – A to view all containers)
docker PS
13. Stop the running container
docker stop image ID
14. Delete container (different from deleting image, here is RM)
docker RM image ID
15. When starting the container, map the port of the JVM and the port of the Tomcat container
docker – run name custom container name – D – P 8888:8080 specify the image template
note: to start mysql, you need to specify the password, and you need to specify the password through the – e command
16. View the firewall status
service firewalld status
17. View the container log
docker log image ID
Read More:
- When docker creates a container command: Error response from daemon: No command specified
- Common linux commands — find command’s Exec
- Docker service start, restart, close command
- Spring boot integrates Mongo to solve some common connection and permission problems. Docker compose installs Mongo
- [Sovled] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- Error: php56w-common conflicts with php-common-5.3.3-48.el6_ 8.x86_ 64
- Docker command error during connect: get http://2F2F.2Fpipe2Fdocker_ engine/v1.36/containers/json: open//.
- systemctl start docker Job for docker.service failed because the control process exited with error
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled
- Docker starts the image and reports an error. Iptables failed: iptables — wait – t NAT – a docker – P TCP
- Docker was unable to connect to the docker daemons
- Docker start error: failed to start docker application container engine.
- How to Fix ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
- The installation of docker desktop failed. After successful installation, the docker can not be started
- Solve Linux docker pull error get https://registry-1.docker.io/v2/ : Net / http: TLS handshake timeout
- Solve the problem of copy failed: stat / var / lib / docker / TMP / docker builder 455335933 / opt: no such file or directory
- The docker copies the win10 host file into the docker container. An error is reported: copying between containers is not supported
- docker Error response from daemon: Bad response from Docker engine
- Solution to command line option syntax error. Type command /? For help
- Centos7 quick installation of docker and configuration of image acceleration