using Github releases to build Docker images

This commit is contained in:
Axel Uhl
2024-05-23 16:30:58 +02:00
parent 97882edbbc
commit ced0b34a6c
5 changed files with 65 additions and 47 deletions
+6 -2
View File
@@ -1,4 +1,8 @@
FROM sapmachine:17.0.11
# This Dockerfile assumes that the release to use is provided as
# ${RELEASE}.tar.gz in the current Docker workspace. Use, e.g.,
# the configuration/github-download-release-assets.sh script to
# obtain the tar.gz file for a specific or the latest "main" release.
ARG RELEASE
LABEL maintainer=axel.uhl@sap.com
# Download and extract the release
@@ -9,8 +13,8 @@ COPY vimrc /root/.vimrc
RUN wget -O /tmp/rds.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem \
&& ${JAVA_HOME}/bin/keytool -importcert -alias AWSRDS -file /tmp/rds.pem -keystore ${JAVA_HOME}/lib/security/cacerts -noprompt -storepass changeit \
&& rm /tmp/rds.pem
RUN wget -O /tmp/${RELEASE}.tar.gz http://releases.sapsailing.com/${RELEASE}/${RELEASE}.tar.gz \
&& tar xzvpf /tmp/${RELEASE}.tar.gz \
COPY ${RELEASE}.tar.gz /tmp
RUN tar xzvpf /tmp/${RELEASE}.tar.gz \
&& rm /tmp/${RELEASE}.tar.gz
COPY env.sh .
RUN cat env-default-rules.sh >>env.sh