Skip to content

Commit

Permalink
Speed-up docker startup for default uid/gid
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoflow committed Dec 2, 2020
1 parent 736753b commit 778b5b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ dpkg-reconfigure -f noninteractive tzdata
groupadd -g $MARV_GID marv || true
useradd -M -u $MARV_UID -g $MARV_GID --shell /bin/bash marv
chown $MARV_UID:$MARV_GID /home/marv
chown -R $MARV_UID:$MARV_GID $MARV_VENV
if [[ $MARV_UID -ne 1000 ]] || [[ $MARV_GID -ne 1000 ]]; then
chown -R $MARV_UID:$MARV_GID $MARV_VENV
fi

for x in /etc/skel/.*; do
target="/home/marv/$(basename "$x")"
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ RUN bash -c '\
rmdir /root/.cache || (ls -la /root/.cache; exit 1) \
fi; \
'
RUN chown -R 1000:1000 /opt/marv

COPY .docker/entrypoint.sh /marv_entrypoint.sh
COPY .docker/env.sh /etc/profile.d/marv_env.sh
Expand Down

0 comments on commit 778b5b3

Please sign in to comment.