Skip to content

Commit

Permalink
Update start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 3, 2024
1 parent 7ba217c commit ab56dff
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions start.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash

# Copy contents of /app/config to /config
cp -Rn /app/config/* /config
chmod -R 777 /config

# Set default values for PUID, PGID, and UMASK
PUID=${PUID:-100}
PGID=${PGID:-99}
Expand All @@ -18,11 +14,17 @@ groupmod -o -g "$PGID" dockeruser
# Modify the user ID of the dockeruser
usermod -o -u "$PUID" dockeruser

# Change ownership of the /app and /app/config directories to dockeruser
chown -R dockeruser:dockeruser /app /app/config
# Change ownership of the /app directory to dockeruser
chown -R dockeruser:dockeruser /app

# Change ownership of the /config directory to dockeruser
chown -R dockeruser:dockeruser /config

# Copy contents of /app/config to /config
cp -Rn /app/config/* /config

# Change permissions of the /config directory to 777
chmod -R 777 /config

# Execute the command as the dockeruser
exec runuser -u dockeruser -g dockeruser -- "$@"

0 comments on commit ab56dff

Please sign in to comment.