Ali cloud linux instances deployed jar docker docker container to create java

1, buy ecs examples

2, for the first time using a remote connection provided Ali will give you a remote password record

3, root user password in the right list more examples, modifications, restart the instance after editing

4. Use the remote interface or other means provided Ali (personal buy is centos7, with putty, file transfer using winScp (not money, xmanager to crack))

5. yum download docker

6. Personal use of container is the way of deployment of web project, first create an image, see step to create a  docker create java container

7. Do docker run

docker run -d -p 8080:8080 -it --name xxxx  jdkimage java -jar /xxxx.jar

8. Use the logs to view the log

docker logs -t -f xxxx

9. Use the curl access address

curl http://localhost:8080

 

Guess you like

Origin www.cnblogs.com/jony-it/p/11427109.html