amazon-corretto-jdk
Amazon-Corretto-JDK Overview
Secure your stack with a hardened Amazon-Corretto-JDK image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.
Amazon Corretto is a binary distribution of OpenJDK (Open Java Development Kit) with patches included by Amazon. Corretto is certified using the Java Technical Compatibility Kit (TCK) to ensure it meets the Java SE standard.
Try It Out
To take the Minimus Amazon-Corretto-JDK image for a test run, we will create a simple Java application and compile and run it using the JDK image.
In your project directory, save the following Java code in a file named HelloCorretto.java:
class HelloCorretto
{
public static void main(String args[])
{
System.out.println("Welcome to Minimus Amazon Corretto JDK!");
System.out.println("Java version: " + System.getProperty("java.version"));
System.out.println("JDK includes compiler: javac");
}
}Note that for Java to compile properly, the filename must match the public class name, so be sure to save the file as HelloCorretto.java.
Next, compile and run the Java application using the Minimus Amazon-Corretto-JDK image:
docker run --rm \
-v "$PWD":/home/build \
-w /home/build \
reg.mini.dev/amazon-corretto-jdk \
sh -c "javac HelloCorretto.java && java HelloCorretto"You should see the greeting Welcome to Minimus Amazon Corretto JDK! along with the Java version, demonstrating that the JDK image includes both the compiler (javac) and runtime (java).
Using JDK in a Dockerfile
You can also create a Dockerfile to run your Java application with the JDK image. Save the following code to a Dockerfile:
FROM reg.mini.dev/amazon-corretto-jdk
COPY HelloCorretto.java /home/build/
WORKDIR /home/build/
RUN javac HelloCorretto.java
CMD ["java", "HelloCorretto"]Next, build and run the custom image. Note that the period . specifies the current directory as the build context:
docker build -t minimus-corretto-jdk-app .
docker run minimus-corretto-jdk-appYou should see the same greeting in your terminal. For production deployments, consider using a multi-stage build with Amazon-Corretto-JRE as the runtime stage for a smaller, more secure final image.
Technical Considerations
The Amazon-Corretto-JDK image provided by Minimus is a slim, security-hardened alternative to the public image from Docker Hub. The images are largely interchangeable, with a few differences as noted below.
Amazon-Corretto-JDK built by Minimus:
- Runs as non-root by default for a security-first approach that protects against privilege escalation attacks.
- Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.
The Payoff
A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.
- See the risk reduction dashboard for a detailed CVE comparison over the past 30 days.
- Review the compliance report to see the default hardening and security configurations for the image.
Terms & Info
Trademark
This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.
Disclaimer
Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.