What is OpenJDK? OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE). OpenJDK is the official reference implementation of Java SE since version 7.
wikipedia.org/wiki/OpenJDK
Java is a registered trademark of Oracle and/or its affiliates.
Start a Java instance in your app The most straightforward way to use this image is to use a Java container as both the build and runtime environment. In your Dockerfile, writing something along the lines of the following will compile and run your project:
FROM killsnow/openjdk:8-jre-alpine
WORKDIR /app
ADD HelloWorld.jar HelloWorld.jar
EXPOSE 8080
CMD java -jar HelloWorld.jar
You can build the Docker image:
$ docker build -t helloworld:1.0 .
You can run the Docker image:
$ docker run -it --rm helloworld:1.0
$ java -version
openjdk version "1.8.0_372"
OpenJDK Runtime Environment (IcedTea 3.27.0) (Alpine 8.372.07-r0)
OpenJDK 64-Bit Server VM (build 25.372-b07, mixed mode)
$ docker scout quickview killsnow/openjdk:8-jre-alpine
INFO New version 0.18.1 available (installed version is 0.16.1)
✓ Pulled
✓ Image stored for indexing
✓ Indexed 94 packages
Your image killsnow/openjdk:8-jre-alpine │ 0C 0H 1M 0L
Base image alpine:3 │ 0C 0H 0M 0L
docker scout cves killsnow/openjdk:8-jre-alpine
INFO New version 0.18.1 available (installed version is 0.16.1)
✓ Pulled
✓ SBOM of image already cached, 94 packages indexed
✗ Detected 1 vulnerable package with 1 vulnerability
0C 0H 1M 0L libjpeg-turbo 2.1.5.1-r3
pkg:apk/alpine/[email protected]?os_name=alpine&os_version=3.18
✗ MEDIUM CVE-2023-2804 [Out-of-bounds Write]
https://dso.docker.com/cve/CVE-2023-2804
Affected range : <2.1.5.1-r4
Fixed version : 2.1.5.1-r4
CVSS Score : 6.5
CVSS Vector : CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
1 vulnerability found in 1 package
LOW 0
MEDIUM 1
HIGH 0
CRITICAL 0
Content type
Image
Digest
sha256:9fc18f048…
Size
65.7 MB
Last updated
about 3 years ago
docker pull killsnow/openjdk