improved Dockerfile
This commit is contained in:
@ -6,11 +6,6 @@ ARG JAVA_VERSION="20.0.2-graal"
|
||||
|
||||
ENV SDKMAN_DIR=/root/.sdkman
|
||||
|
||||
COPY entrypoint.sh /home/container
|
||||
|
||||
RUN useradd -d /home/container -m container -s /bin/bash -p 'none' \
|
||||
&& passwd -d container
|
||||
|
||||
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 \
|
||||
@ -22,6 +17,8 @@ RUN apt-get update \
|
||||
&& 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 \
|
||||
&& useradd -d /home/container -m container -s /bin/bash -p 'none' \
|
||||
&& passwd -d container
|
||||
|
||||
RUN bash -c "source "${SDKMAN_DIR}"/bin/sdkman-init.sh \
|
||||
&& sdk version \
|
||||
@ -34,7 +31,7 @@ USER container
|
||||
WORKDIR /home/container
|
||||
ENV USER container
|
||||
ENV HOME /home/container
|
||||
|
||||
COPY entrypoint.sh /home/container
|
||||
SHELL ["/bin/bash", "-i", "-c"]
|
||||
|
||||
ENTRYPOINT [ "/root/entrypoint.sh" ]
|
Reference in New Issue
Block a user