jdk14-alpine/Dockerfile

50 lines
2.6 KiB
Docker
Raw Normal View History

2023-03-30 18:52:11 +02:00
ARG BASE_IMAGE="adoptopenjdk/openjdk14:alpine"
2023-03-30 17:58:04 +02:00
FROM ${BASE_IMAGE}
2023-03-30 18:52:11 +02:00
# Install groovy
ENV GROOVY_HOME=/opt/groovy
ENV GROOVY_VERSION=4.0.9
2023-03-30 19:11:10 +02:00
# Install docker-cli, docker-compose, git, bash
RUN apk update && \
2023-03-30 19:16:31 +02:00
apk add --no-cache docker-cli python3 py3-pip git bash && \
2023-03-30 19:14:34 +02:00
apk add --no-cache --virtual .docker-compose-deps python3-dev libffi-dev openssl-dev gcc libc-dev make && \
2023-03-30 19:51:30 +02:00
# ln -s /usr/bin/pip3 /usr/bin/pip && \
2023-03-30 19:19:00 +02:00
ln -s /usr/bin/python3 /usr/bin/python && \
2023-03-30 19:56:52 +02:00
pip install --upgrade pip && \
2023-03-30 19:11:10 +02:00
pip3 install docker-compose && \
apk del .docker-compose-deps
2023-03-30 19:16:31 +02:00
2023-03-30 18:52:11 +02:00
RUN set -o errexit -o nounset && echo "Installing build dependencies" && \
apk add --no-cache --virtual .build-deps gnupg && \
echo "Downloading Groovy" && \
wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" && \
echo "Importing keys listed in http://www.apache.org/dist/groovy/KEYS from key server" && \
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --no-tty --keyserver keyserver.ubuntu.com --recv-keys 7FAA0F2206DE228F0DB01AD741321490758AAD6F 331224E1D7BE883D16E8A685825C06C827AF6B66 34441E504A937F43EB0DAEF96A65176A0FB1CD0B 9A810E3B766E089FFB27C70F11B595CEDC4AEBB5 81CABC23EECA0790E8989B361FF96E10F0E13706 && \
echo "Checking download signature" && \
wget --no-verbose --output-document=groovy.zip.asc "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip.asc" && \
gpg --batch --no-tty --verify groovy.zip.asc groovy.zip && \
rm -rf "${GNUPGHOME}" \
&& rm groovy.zip.asc && \
echo "Cleaning up build dependencies" && \
apk del .build-deps && echo "Installing Groovy" && \
unzip groovy.zip && \
rm groovy.zip && \
mv "groovy-${GROOVY_VERSION}" "${GROOVY_HOME}/" && \
ln -s "${GROOVY_HOME}/bin/grape" /usr/bin/grape && \
ln -s "${GROOVY_HOME}/bin/groovy" /usr/bin/groovy && \
ln -s "${GROOVY_HOME}/bin/groovyc" /usr/bin/groovyc && \
ln -s "${GROOVY_HOME}/bin/groovyConsole" /usr/bin/groovyConsole && \
ln -s "${GROOVY_HOME}/bin/groovydoc" /usr/bin/groovydoc && \
ln -s "${GROOVY_HOME}/bin/groovysh" /usr/bin/groovysh && \
ln -s "${GROOVY_HOME}/bin/java2groovy" /usr/bin/java2groovy && \
echo "Editing startGroovy to include java.xml.bind module" && \
sed --in-place 's|startGroovy ( ) {|startGroovy ( ) {\n JAVA_OPTS="$JAVA_OPTS --add-modules=ALL-SYSTEM"|' "${GROOVY_HOME}/bin/startGroovy"
RUN apk add --no-cache openssh-client
2024-06-16 21:21:40 +02:00
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx