Skip to content

Commit

Permalink
Merge pull request #153 from infosiftr/chown
Browse files Browse the repository at this point in the history
Only chown things in the entrypoint that are not already owned by node
  • Loading branch information
tianon authored Sep 28, 2018
2 parents b557680 + d14e83c commit fe5b895
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 0/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# allow the container to be started with `--user`
if [[ "$*" == npm*start* ]] && [ "$(id -u)" = '0' ]; then
chown -R node "$GHOST_CONTENT"
find "$GHOST_CONTENT" \! -user node -exec chown node '{}' +
exec su-exec node "$BASH_SOURCE" "$@"
fi

Expand Down
2 changes: 1 addition & 1 deletion 0/debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# allow the container to be started with `--user`
if [[ "$*" == npm*start* ]] && [ "$(id -u)" = '0' ]; then
chown -R user "$GHOST_CONTENT"
find "$GHOST_CONTENT" \! -user user -exec chown user '{}' +
exec gosu user "$BASH_SOURCE" "$@"
fi

Expand Down
2 changes: 1 addition & 1 deletion 1/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# allow the container to be started with `--user`
if [[ "$*" == node*current/index.js* ]] && [ "$(id -u)" = '0' ]; then
chown -R node "$GHOST_CONTENT"
find "$GHOST_CONTENT" \! -user node -exec chown node '{}' +
exec su-exec node "$BASH_SOURCE" "$@"
fi

Expand Down
2 changes: 1 addition & 1 deletion 1/debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# allow the container to be started with `--user`
if [[ "$*" == node*current/index.js* ]] && [ "$(id -u)" = '0' ]; then
chown -R node "$GHOST_CONTENT"
find "$GHOST_CONTENT" \! -user node -exec chown node '{}' +
exec gosu node "$BASH_SOURCE" "$@"
fi

Expand Down
2 changes: 1 addition & 1 deletion 2/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# allow the container to be started with `--user`
if [[ "$*" == node*current/index.js* ]] && [ "$(id -u)" = '0' ]; then
chown -R node "$GHOST_CONTENT"
find "$GHOST_CONTENT" \! -user node -exec chown node '{}' +
exec su-exec node "$BASH_SOURCE" "$@"
fi

Expand Down
2 changes: 1 addition & 1 deletion 2/debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# allow the container to be started with `--user`
if [[ "$*" == node*current/index.js* ]] && [ "$(id -u)" = '0' ]; then
chown -R node "$GHOST_CONTENT"
find "$GHOST_CONTENT" \! -user node -exec chown node '{}' +
exec gosu node "$BASH_SOURCE" "$@"
fi

Expand Down

0 comments on commit fe5b895

Please sign in to comment.