Add jdk-version Label and jdk check README

This commit is contained in:
Christian Tzolov
2020-09-21 23:13:36 +02:00
committed by David Turanski
parent acb64081fb
commit f780008758
3 changed files with 16 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/.idea/

View File

@@ -31,6 +31,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y wget
COPY --from=retrieve download.tar.gz /tmp/download.tar.gz
LABEL jdk-version=11.0.8_10
RUN mkdir -p /usr/lib/jvm \
&& tar xzf /tmp/download.tar.gz -C /usr/lib/jvm \
&& ln -s /usr/lib/jvm/* /usr/lib/jvm/jre \

View File

@@ -8,3 +8,16 @@ A base image used for building images of executable components:
Includes Java 11+, and some common utilities
#### Retrieve the JDK version
You can check the Java version bundled with a particular image tag, like this:
```
docker run -it --rm springcloud/baseimage:<image-tag> java -version
```
or by retrieving the `jdk-version` image label:
```
docker inspect springcloud/openjdk:<image-tag> | grep jdk-version
```