ARG VARIANT=21-jdk FROM eclipse-temurin:${VARIANT} RUN apt-get update \ && apt-get -y install --no-install-recommends \ ca-certificates \ git \ nano \ unzip \ vim-tiny \ && apt-get auto-remove -y \ && apt-get clean -y \ && chsh -s $(which bash) ubuntu \ && echo 'export PS1="\e[01;32m\u\e[m:\e[01;34m\w\e[m\$ "' >> /home/ubuntu/.bashrc ARG NEXUS_REPO=https://rm.vilanet.fr/repository/raw RUN --mount=type=secret,id=nexus_login,target=/tmp/nexus_login \ --mount=type=secret,id=nexus_pwd,target=/tmp/nexus_pwd \ curl -Lo /tmp/jetbrains.zip -u$(cat nexus_login):$(cat nexus_pwd) ${NEXUS_REPO}/jetbrains.zip ENV MAVEN_HOME=/opt/maven ENV PATH=$MAVEN_HOME/bin:$PATH ARG MAVEN_VERSION=3.9.11 ARG BASE_URL=https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries RUN mkdir -p $MAVEN_HOME \ && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ && tar -xzf /tmp/apache-maven.tar.gz -C $MAVEN_HOME --strip-components=1 \ && rm -f /tmp/apache-maven.tar.gz # Set the default user USER ubuntu RUN mkdir -p /home/ubuntu/.local/share && \ unzip -d /home/ubuntu/.local/share /tmp/jetbrains.zip ENV IDEA_VM_OPTIONS=/home/ubuntu/.local/share/jetbrains/vmoptions/idea.vmoptions # Set the working directory WORKDIR /home/ubuntu