Skip to content

Commit

Permalink
docker/build-test: fix user setup for new base image
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed Dec 16, 2024
1 parent 3d13754 commit f4c7ae9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/build-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ RUN java_certs=$JAVA_HOME/lib/security/cacerts; \
# launching the container.
#
RUN sed --in-place -e '/CREATE_MAIL_SPOOL/ s/=yes/=no/' /etc/default/useradd
ARG devuser=developer
ARG devuser=ubuntu
ARG devuid=1000
RUN grep -qs :${devuid}: /etc/group || \
groupadd --gid $devuid $devuser
RUN grep -qs ":${devuid}:[[:digit:]]+:" /etc/passwd || \
RUN grep -qsE ":${devuid}:[[:digit:]]+:" /etc/passwd || \
useradd -m --comment "OAR Developer" --shell /bin/bash \
--gid $devuid --uid $devuid $devuser
RUN mkdir /home/$devuser/.m2
Expand All @@ -37,7 +37,7 @@ VOLUME /app/dev
VOLUME /app/dist
COPY settings.xml /app/mvn-user-settings.xml
COPY settings.xml /home/$devuser/.m2/settings.xml
RUN chown $devuser:$devuser /home/$devuser/.m2/settings.xml && \
RUN chown $devuser:$devuid /home/$devuser/.m2/settings.xml && \
chmod a+r /home/$devuser/.m2/settings.xml
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod a+rx /app/entrypoint.sh
Expand Down

0 comments on commit f4c7ae9

Please sign in to comment.