Spring Cloud project deployment (d) upload docker Mirror

1. Upload the mirror. Under each item root directory, open cmd, enter

mvn clean package docker:build -Dmaven.test.skip=true

 

2. Check docker mirror, docker images

  

3. Create and start the eureka container,

docker run -d -p 8761:8761 --name eureka-server shi/eureka-server

--- the first name is the name of the vessel, a mirror image of the second name.

Start container. If there is,

Notes Linux server is not turned forward, you need to configure /etc/sysctl.conf, addnet.ipv4.ip_forward=1

 

4. After the normal start, in the machine-accessible address bar 192.168.0.170:8761

 

5. Create and start system-server container. --Link specified container using the connector.

docker run -d --name system-server --link eureka-server --publish 8081:8081 shi/system-server

After the execution View 8761, has been successfully registered system-server service

 

Guess you like

Origin www.cnblogs.com/shiblog/p/11541787.html