1.mvn package generate the jar
2.edit the Dockerfile
FROM java:8
VOLUME /tmp
ADD eurekaA-0.0.1.jar app.jar
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
3.put the dockerfile in the same folder as jar
4.build the image: sudo docker build -t="eureka_a" .
(don't forget the . in the end)
5.run the image: sudo docker run -d -p 9001:9001 eureka_a
--net=host(network netting)
finish!