What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To run a Spring Boot application in Docker, first package it as an executable JAR, then create an image with either a Dockerfile or Spring Boot’s Cloud Native Buildpacks integration. This guide uses the Spring Boot 4.1.1 reference for its examples; match the instructions to your project’s Spring Boot and Java versions.
Package the application and verify its executable JAR
Build the application with the Spring Boot Maven or Gradle plugin, then run the resulting executable JAR directly before adding Docker to the workflow. For a Maven project, the documented command is:
java -jar target/myapplication-0.0.1-SNAPSHOT.jar
Use the actual JAR filename and output path from your build. For Gradle, check the project’s build/libs/ directory. If the application does not start directly, resolve that packaging or application issue before troubleshooting the container.
Spring Boot’s running application documentation describes running an executable archive with java -jar.
#1 Best Overall
- Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
- Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
- Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
- Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
- Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
Choose how to create the image
Spring Boot documents two routes: a Dockerfile, where you control the image construction steps, and Cloud Native Buildpacks, which create a container image through the build plugin. The right option depends on how much of the image build your team wants to configure directly and how well a buildpack workflow fits your project.
| Approach | How image creation works | What you control |
|---|---|---|
| Dockerfile | Docker builds an image from the instructions and files in the build context. | You specify the build and runtime stages, copy steps, and other image-construction details. |
| Buildpack | The Spring Boot build plugin invokes a buildpack to create an OCI image. | You use plugin and image settings appropriate to the project rather than writing every image-construction step in a Dockerfile. |
The Spring Boot container images reference describes both methods. Neither option is established as universally smaller, faster, or more secure; select based on the project’s requirements and the configuration your team wants to maintain.
Rank #2
- Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
- Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
- Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
- Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
- From Sandisk, a brand professional photographers trust to take on assignments.
Build an image with a Dockerfile
For a Dockerfile, use the example in the Spring Boot Dockerfiles documentation as the version-matched starting point. Its current example uses a multi-stage build: a builder stage extracts the application JAR’s layers, and a runtime stage copies those layers into the final image.
With a Dockerfile in the current directory, the documented build command is:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #3
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
docker build .
The example also allows the JAR path to be supplied as a build argument. Make sure the Dockerfile’s ARG JAR_FILE value matches your build output: commonly, Maven produces an archive under target/, while Gradle produces one under build/libs/. Use a clear image tag when adapting the build command so you can refer to the resulting image in your run command.
Why extract the JAR into layers?
A Spring Boot layered archive separates content into four default layers: dependencies, spring-boot-loader, snapshot-dependencies, and application. These groups reflect different kinds of archive content and how often they may change. Application code often changes more frequently than released dependencies, so keeping it separate can let Docker reuse unchanged lower layers from cache when code changes.
Rank #4
- NEARLY 2X FASTER THAN OUR PREVIOUS GENERATION(8) – move 1,000 high-res photos in under 60 seconds(6) with up to 2000MB/s transfer speeds(2).
- IP65 RATING AND UP TO 3M DROP PROTECTION(3) – protects against spills and drops.
- POCKET-SIZED – fits easily in pockets and small bags.
- SPACE TO OWN YOUR AI CONTENT – speed and capacity to download your high-res clips and photo edits.
- 256-BIT AES ENCRYPTION(4) – helps keep private files secure with password protection.
Layering is a cache and rebuild strategy, not a guarantee that every build will be faster or that the image will be smaller. See Spring Boot’s efficient container images documentation for the layer details.
Create an image with Spring Boot buildpacks
If you prefer the buildpack workflow, the Spring Boot Maven plugin provides the spring-boot:build-image goal. It runs packaging and creates an OCI image using a buildpack. Follow the Maven build-image goal reference for the plugin options, and choose builder and runtime image settings for your project rather than assuming one configuration applies to every application.
Best Value
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
For Gradle, consult the Gradle packaging documentation for the matching plugin workflow. Plugin parameters, Java versions, and image settings can vary by Spring Boot version, so use documentation corresponding to the version in your build.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Run the image and check the common failure points
After building the image, run it using the image name and tag you chose, and publish the application’s configured server port to a host port. Confirm the application’s port in its configuration before choosing the container and host port values; a port mapping cannot make the application listen on a different port by itself.
- JAR not found during the image build: Confirm the archive exists and that the Dockerfile’s
ARG JAR_FILEpath is correct relative to the Docker build context. - Image build fails: Check that the Dockerfile is in the current build context and that the selected base image and Java runtime suit the application’s Spring Boot and Java versions.
- Container starts but the app is unreachable: Inspect startup logs, verify the app started successfully, and ensure the published port corresponds to the application’s configured server port.
Base images and Java compatibility assumptions are version-sensitive. Use the version-matched Dockerfile reference or build-image plugin reference rather than carrying settings forward from an older Spring Boot example without checking them.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

