-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from infosiftr/any-user
Allow arbitrary --user values
- Loading branch information
Showing
5 changed files
with
15 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ "$1" = 'redis-server' ]; then | ||
# allow the container to be started with `--user` | ||
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then | ||
chown -R redis . | ||
exec gosu redis "$@" | ||
exec gosu redis "$BASH_SOURCE" "$@" | ||
fi | ||
|
||
exec "$@" |
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,9 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ "$1" = 'redis-server' ]; then | ||
# allow the container to be started with `--user` | ||
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then | ||
chown -R redis . | ||
exec gosu redis "$@" | ||
exec gosu redis "$BASH_SOURCE" "$@" | ||
fi | ||
|
||
exec "$@" |
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,9 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ "$1" = 'redis-server' ]; then | ||
# allow the container to be started with `--user` | ||
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then | ||
chown -R redis . | ||
exec gosu redis "$@" | ||
exec gosu redis "$BASH_SOURCE" "$@" | ||
fi | ||
|
||
exec "$@" |
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,9 +1,10 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ "$1" = 'redis-server' ]; then | ||
# allow the container to be started with `--user` | ||
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then | ||
chown -R redis . | ||
exec gosu redis "$@" | ||
exec gosu redis "$0" "$@" | ||
fi | ||
|
||
exec "$@" |
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,9 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ "$1" = 'redis-server' ]; then | ||
# allow the container to be started with `--user` | ||
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then | ||
chown -R redis . | ||
exec gosu redis "$@" | ||
exec gosu redis "$BASH_SOURCE" "$@" | ||
fi | ||
|
||
exec "$@" |