Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Cloud-Native Microservices with Jakarta EE

You're reading from   Hands-On Cloud-Native Microservices with Jakarta EE Build scalable and reactive microservices with Docker, Kubernetes, and OpenShift

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781788837866
Length 352 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Luigi Fugaro Luigi Fugaro
Author Profile Icon Luigi Fugaro
Luigi Fugaro
Mauro Vocale Mauro Vocale
Author Profile Icon Mauro Vocale
Mauro Vocale
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Jakarta EE - the New Open Source Life of Java EE FREE CHAPTER 2. Microservices and Reactive Architecture 3. Cloud-Native Applications 4. Building Microservices Using Thorntail 5. Eclipse MicroProfile and Transactions - Narayana LRA 6. Linux Containers 7. Platform as a Service 8. Microservices Patterns 9. Deployment 10. Monitoring 11. Building Microservices Using Spring Boot 2 12. Building Microservices Using Vert.X 13. Other Books You May Enjoy

football-player-microservice

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
...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime