IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Run a Java application in a Docker container

Last modified: 10 August 2022

Required plugins: Docker (bundled)

You can use Docker to run a Java application in a container with a specific runtime environment. This tutorial describes how to create a Dockerfile for running a simple Java application in a container with OpenJDK 17. It also shows how to create a Docker image with your application to share it with others.

Before you begin:

You can share the image with others, for example, to demonstrate exactly how your application is expected to run, without the need to install the necessary runtime (only Docker is required).