Skip to content

Commit

Permalink
fix: give the agate user a fixed UID and GID
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed Dec 15, 2024
1 parent fa49d48 commit 029e0b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ RUN chmod +x /usr/share/agate/bin/agate

COPY ./bin /opt/agate/bin

RUN chmod +x -R /opt/agate/bin && \
adduser --system --home $AGATE_HOME --no-create-home --disabled-password agate && \
RUN groupadd --system --gid 10041 agate && \
useradd --system --home $AGATE_HOME --no-create-home --uid 10041 --gid agate agate; \
chmod +x -R /opt/agate/bin && \
chown -R agate /opt/agate

VOLUME /srv
Expand Down
3 changes: 1 addition & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
set -e

if [ "$1" = 'app' ]; then
chown -R agate "$AGATE_HOME"

chown -R agate:agate "$AGATE_HOME"
exec gosu agate /opt/agate/bin/start.sh
fi

Expand Down

0 comments on commit 029e0b4

Please sign in to comment.