Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Transitioning to Java

You're reading from   Transitioning to Java Kickstart your polyglot programming journey by getting a clear understanding of Java

Arrow left icon
Product type Paperback
Published in Apr 2023
Publisher Packt
ISBN-13 9781804614013
Length 354 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ken Fogel Ken Fogel
Author Profile Icon Ken Fogel
Ken Fogel
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Part 1:The Java Development Environment
2. Chapter 1: Understanding Java Distributions FREE CHAPTER 3. Chapter 2: Code, Compile, and Execute 4. Chapter 3: The Maven Build Tool 5. Part 2:Language Fundamentals
6. Chapter 4: Language Fundamentals – Data Types and Variables 7. Chapter 5: Language Fundamentals – Classes 8. Chapter 6: Methods, Interfaces, Records, and Their Relationships 9. Chapter 7: Java Syntax and Exceptions 10. Chapter 8: Arrays, Collections, Generics, Functions, and Streams 11. Chapter 9: Using Threads in Java 12. Chapter 10: Implementing Software Design Principles and Patterns in Java 13. Chapter 11: Documentation and Logging 14. Chapter 12: BigDecimal and Unit Testing 15. Part 3:GUI and Web Coding in Java
16. Chapter 13: Desktop Graphical User Interface Coding with Swing and JavaFX 17. Chapter 14: Server-Side Coding with Jakarta 18. Chapter 15: Jakarta Faces Application 19. Part 4:Packaging Java Code
20. Chapter 16: Deploying Java in Standalone Packages and Containers 21. Index 22. Other Books You May Enjoy

Creating a Docker image

Now, we are ready to create our own image. First, we need to stop the container we just used:

docker stop finance

In a terminal/console, enter the following command to create your new container, which will contain the Payara image:

docker create --name transition -p 8080:8080
         -p 4848:4848 payara/server-full:6.2023.2-jdk17

The name transition is arbitrary and can be anything you want. You now have a new container based on the Payara image. We want to modify this container to include the calculator application. The first step is to run this new container:

docker start transition

The most common error that occurs here is if another container is listening to the same ports. Ensure that any containers or images with Payara are not running. The Docker Desktop app can show you which containers or images are running.

Just as we did when we tested the Payara image, use your browser to open the...

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
Banner background image