Skip to content

Commit

Permalink
Merge pull request #33 from jsoref/suppress-error
Browse files Browse the repository at this point in the history
Improve handling of nonexistent user
  • Loading branch information
rchakode authored Jul 30, 2023
2 parents 118f5ed + fcdae36 commit 2024c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ WORKDIR /app
COPY --from=builder /app/dist .
RUN apt update && \
apt install --no-install-recommends -y libsqlite3-0 graphviz sudo && \
(id ${APP_USER} || useradd ${APP_USER} -u $APP_USER_UID) && \
(id ${APP_USER} 2>/dev/null || (echo creating user ${APP_USER}=$APP_USER_UID && useradd ${APP_USER} -u $APP_USER_UID)) && \
echo "${APP_USER} ALL=NOPASSWD: ALL" > /etc/sudoers.d/user && \
mkdir -p /app/www/run /data && \
chown -R ${APP_USER}:${APP_USER} /app /data && rm -rf /var/lib/apt/lists/*;
Expand Down

0 comments on commit 2024c5e

Please sign in to comment.