Centos 7 :
Service network restart
Ip addr View ip address
Uname -r View kernel version
Yum install docker Install docker command (guaranteed network)
systemct1 start docker 启动docker
Docker -v View version number
systemctl enable docker set boot on boot
Systemctl stop docker 停止docker
Docker image operation:
1. docker search search command
Hub.docker.com
2. Docker pull image name: tag
3. Docker images View local download images
4. Docker rmi mirror ID delete mirror
Docker container operation:
1, docker run --name custom name -d image name: label name
--name custom name
-d runs in the background
例:docker run --name myredis -d redis:tag
2. docker ps view container (-a view all)
3. Docker start container name or Id to start the container
4. Docker stop container name or Id to stop the container
5. Docker rm container Id delete container
6, docker run --name custom name -d -p port: port image name: label name
--name custom name
-d runs in the background
-p map the host port to the container port host port: container port
例:docker run --name myredis -d -p 5763:5763 redis:tag
7. service firewalld status View firewall status
service firewalld stop
8. View container logs
Docker logs container name / ID
Install the Oracle database:
1. Installation
docker pull christophesurmont/oracle-xe-11g
2. Run
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true christophesurmont/oracle-xe-11g
3. Enter the container
docker exec -it container id / bin / bash