# vim /usr/lib/systemd/system/docker.service
ExecStart = / usr / bin / dockerd-current followed by
-H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
ctrl + shift +alt +s
Configuration docker connection
Creating Dockerfile file in the root directory of the project (preferably not too fine)
FROM java:8
#指定维护者信息
MAINTAINER llf
ADD target/cmp-gateway.jar gateway.jar
RUN bash -c 'touch /gateway.jar'
ENV JAVA_OPTS=""
EXPOSE 4456 #暴露的端口号
#指定执行启动spring boot小项目 ENTRYPOINT 为容器启动后执行的命令
ENTRYPOINT ["java","-jar","/gateway.jar"]
Point which will do