Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created October 2, 2020 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyasugano/737248937fe092b421707cdb3cc77c07 to your computer and use it in GitHub Desktop.
Save yuyasugano/737248937fe092b421707cdb3cc77c07 to your computer and use it in GitHub Desktop.
Volume permission problems sample
#!/bin/bash
USER_ID=${LOCAL_UID:-9001}
GROUP_ID=${LOCAL_GID:-9001}
echo "Starting with UID: $USER_ID, GID: $GROUP_ID"
useradd -u $USER_ID -o -m user
groupmod -g $GROUP_ID user
export HOME=/home/user
exec /usr/sbin/gosu user "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment