feat: refactored Dockerfile (#1375)
- Removed VIKUNJA_VERSION and custom git checkout, because it is not found in the repository. So it is not used anywhere. - Optimized runner commands order - Removed run.sh (it is not needed in fact) Co-authored-by: Yurii Vlasov <yv@itsvit.org> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1375 Co-authored-by: Yurii Vlasov <yuriy@vlasov.pro> Co-committed-by: Yurii Vlasov <yuriy@vlasov.pro>
This commit is contained in:
15
docker/entrypoint.sh
Normal file
15
docker/entrypoint.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
if [ -n "$PUID" ] && [ "$PUID" -ne 0 ] && \
|
||||
[ -n "$PGID" ] && [ "$PGID" -ne 0 ] ; then
|
||||
echo "info: creating the new user vikunja with $PUID:$PGID"
|
||||
addgroup -g "$PGID" vikunja
|
||||
adduser -s /bin/sh -D -G vikunja -u "$PUID" vikunja -h /app/vikunja -H
|
||||
chown -R vikunja:vikunja ./
|
||||
su -pc /app/vikunja/vikunja - vikunja "$@"
|
||||
else
|
||||
echo "info: creation of non-root user is skipped"
|
||||
exec /app/vikunja/vikunja "$@"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user