- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Guided: Deploying a Java SE App with Docker
In this Code Lab, you'll take a simple Java SE web application and containerize it using Docker. You will learn to write a basic Dockerfile, build an image, and run a container. Then, you'll discover the power of optimization by converting your Dockerfile to a multi-stage build, creating a smaller, more secure final image. **Note:** This lab experience was developed by the Pluralsight team using Forge, an internally developed AI tool utilizing Gemini technology. All sections were verified by human experts for accuracy prior to publication. For issue reporting, please [contact us](https://help.pluralsight.com/hc/en-us/requests/new).
Lab Info
Table of Contents
-
Challenge
Introduction
Introduction
-
Challenge
Exploring the Starter Application
Exploring the starter application.
-
Challenge
Creating a Basic Dockerfile
Define base image and working directory. Copy source code and compile. Expose port and define run command.
-
Challenge
Building and Running the Container
Building and running the container.
-
Challenge
Optimizing with a Multi-Stage Build
Name the build stage. Define the final runtime stage. Copy artifact and set final command.
-
Challenge
Conclusion
Conclusion
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.