football-player-microservice

The following is the Dockerfile for the football-player-microservice:

FROM docker.io/openjdkADD football-player-microservice/target/football-player-microservice-thorntail.jar /opt/service.jarENTRYPOINT ["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 ...

Get Hands-On Cloud-Native Microservices with Jakarta EE now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.