-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix docker bind mount permission issues
- Loading branch information
1 parent
7d638ed
commit 9f234a2
Showing
3 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo mkdir -p /mediafx/build/Linux && sudo chown mediafx /mediafx/build/ /mediafx/build/Linux | ||
exec "$@" | ||
OLD_UID=$(id -u mediafx) | ||
NEW_UID=$(stat -c "%u" /mediafx/CMakeLists.txt) | ||
if [ ! -z "$NEW_UID" -a "$NEW_UID" != "0" -a "$OLD_UID" != "$NEW_UID" ]; then | ||
usermod -u "$NEW_UID" -o mediafx | ||
fi | ||
|
||
mkdir -p /mediafx/build/Linux && chown -R mediafx /mediafx/build/Linux | ||
exec gosu mediafx /entrypoint/xvfb.sh "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
exec /usr/bin/xvfb-run --server-args="-screen 0 640x480x24 -nolisten unix" --error-file=/tmp/xvfb.err "$@" | ||
[ -f /tmp/xvfb.err ] && cat /tmp/xvfb.err |