forked from corretto/corretto-8-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (27 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM amazonlinux:2
ARG version=1.8.0_252.b09-1
# In addition to installing the Amazon corretto, we also install
# fontconfig. The folks who manage the docker hub's
# official image library have found that font management
# is a common usecase, and painpoint, and have
# recommended that Java images include font support.
#
# See:
# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java
# The logic and code related to Fingerprint is contributed by @tianon in a Github PR's Conversation
# Comment = https://github.com/docker-library/official-images/pull/7459#issuecomment-592242757
# PR = https://github.com/docker-library/official-images/pull/7459
RUN set -eux \
&& export GNUPGHOME="$(mktemp -d)" \
&& curl -fL -o corretto.key https://yum.corretto.aws/corretto.key \
&& gpg --batch --import corretto.key \
&& gpg --batch --export --armor '6DC3636DAE534049C8B94623A122542AB04F24E3' > corretto.key \
&& rpm --import corretto.key \
&& rm -r "$GNUPGHOME" corretto.key \
&& curl -fL -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \
&& grep -q '^gpgcheck=1' /etc/yum.repos.d/corretto.repo \
&& yum update -y \
&& yum install -y java-1.8.0-amazon-corretto-devel-$version \
&& yum install -y fontconfig \
&& yum clean all
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto