The following is the Dockerfile for the football-player-microservice:
FROM docker.io/openjdk
ADD football-player-microservice/target/football-player-microservice-thorntail.jar /opt/service.jar
ENTRYPOINT ["java","-jar","/opt/service.jar"]
CMD [""]
Now, within the same path of the Docker file, build the Docker image, as follows:
docker build -f football-player-microservice.dockerfile -t foogaro/football-player-microservice
Check that the image is actually on your local Docker registry, issuing the following command:
docker images
If the image that was just built is listed (it should appear at the top of the list), run the container, as follows:
docker run -it --rm=true --name="football-player-microservice" -p 8180:8180 foogaro/football-player-microservice -Dswarm.http.port=8180 -Dweb.primary.port=8180
...