Last active
October 5, 2019 20:15
-
-
Save yardbirdsax/f0e425230a49173877b21a9f3d691c67 to your computer and use it in GitHub Desktop.
How to have bind-mount volumes in Docker owned by non root users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
chown -R demo:demo /data | |
if [ -z "$RUNAS" ] | |
then | |
exec runuser -u demo "$@" | |
else | |
exec "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment