rebuild image

This commit is contained in:
2023-08-14 17:21:13 +02:00
parent 3c77eae29f
commit f7ab11d4c6
8 changed files with 29 additions and 292 deletions

View File

@ -1,30 +1,35 @@
FROM alpine:3.14
FROM bitnami/minideb:latest
ARG GRAALVERSION
LABEL maintainer="Uzurka <me@uzurka.fr>"
COPY platform.sh ./platform.sh
RUN ls -l
RUN chmod +x ./platform.sh && ./platform.sh
ARG JAVA_VERSION="20.0.2-graal"
RUN apk update && apk upgrade && \
apk add --no-cache curl ca-certificates bash tzdata fontconfig zip sed
ENV SDKMAN_DIR=/root/.sdkman
SHELL ["/bin/bash", "-c"]
COPY entrypoint.sh /root
RUN curl -s "https://get.sdkman.io" | bash && \
source "/root/.sdkman/bin/sdkman-init.sh" && \
sdk install java $GRAALVERSION && \
sdk flush
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl zip unzip ca-certificates locales \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* \
&& curl 'https://get.sdkman.io' | bash \
&& echo "sdkman_auto_answer=true" > "${SDKMAN_DIR}"/etc/config \
&& echo "sdkman_auto_selfupdate=false" >> "${SDKMAN_DIR}"/etc/config \
&& echo "sdkman_insecure_ssl=true" >> "${SDKMAN_DIR}"/etc/config \
&& chmod +x "${SDKMAN_DIR}"/bin/sdkman-init.sh \
&& chmod +x /root/entrypoint.sh
ENV LANG C.UTF-8
RUN bash -c "source "${SDKMAN_DIR}"/bin/sdkman-init.sh \
&& sdk version \
&& sdk install java "${JAVA_VERSION}" \
&& gu install js \
&& rm -rf "${SDKMAN_DIR}"/archives/* \
&& rm -rf "${SDKMAN_DIR}"/tmp/*"
RUN adduser -D -h /home/container -s /bin/bash container
USER container
WORKDIR /home/container
WORKDIR /opt/app
COPY _docker-java-home /usr/local/bin/docker-java-home
COPY _bashrc /home/container/.bashrc
COPY _entrypoint.sh /entrypoint.sh
SHELL ["/bin/bash", "-i", "-c"]
# Commande d'entrée
CMD ["/bin/bash", "/entrypoint.sh"]
ENTRYPOINT [ "/root/entrypoint.sh" ]