How docker deploy the server?
How to deploy a server with docker:
This article takes a server deployed with docker on Alibaba Cloud as an example.
(1) Own an Alibaba Cloud student machine (poor)
(2) The recommended system here is CentOS 7.3
(3) First log in to the root account, this Normal people should be able to do this (sudo su root)
(4) Next, enter the command yum install docker
(5) You can try docker -v to determine whether you have finished issuing the basic docker command
(6) Because I am a back-end person, I prefer to use IDEA to remotely docker. Here we need to involve the issue of opening ports. The default port of docker on Alibaba Cloud is 2375. .
(7) Because Alibaba Cloud’s default firewall does not open 2375, you need to turn off the firewall while opening the port. Because student computers are not very afraid of being exploded, so I leave it fully open by default. .
(8) Next is the IDEA part. Generally, IDEA will integrate docker. The first is to configure docker
Next try to see if the connection is successful and you should be able to see the following screen
In this way, the docker deployment is initially completed.
Recommended tutorial: "docker tutorial"
The above is the detailed content of How to deploy a server with docker?. For more information, please follow other related articles on the PHP Chinese website!