Skip to content

Commit

Permalink
Fix WIREMOCK_OPTIONS duplicated (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerosa authored Oct 23, 2023
1 parent c51282c commit b6dcacf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ set -e

# Set `java` command if needed
if [ "$1" = "" -o "${1#-}" != "$1" ]; then
set -- java $JAVA_OPTS -cp /var/wiremock/lib/*:/var/wiremock/extensions/* wiremock.Run "$@" $WIREMOCK_OPTIONS
set -- java $JAVA_OPTS -cp /var/wiremock/lib/*:/var/wiremock/extensions/* wiremock.Run "$@"
fi

# allow the container to be started with `-e uid=`
if [ "$uid" != "" ]; then
# Change the ownership of /home/wiremock to $uid
chown -R $uid:$uid /home/wiremock

set -- su-exec $uid:$uid "$@" $WIREMOCK_OPTIONS
set -- su-exec $uid:$uid "$@"
fi

exec "$@" $WIREMOCK_OPTIONS
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ set -e

# Set `java` command if needed
if [ "$1" = "" -o "${1:0:1}" = "-" ]; then
set -- java $JAVA_OPTS -cp /var/wiremock/lib/*:/var/wiremock/extensions/* wiremock.Run "$@" $WIREMOCK_OPTIONS
set -- java $JAVA_OPTS -cp /var/wiremock/lib/*:/var/wiremock/extensions/* wiremock.Run "$@"
fi

# allow the container to be started with `-e uid=`
if [ "$uid" != "" ]; then
# Change the ownership of /home/wiremock to $uid
chown -R $uid:$uid /home/wiremock
set -- gosu $uid:$uid "$@" $WIREMOCK_OPTIONS
set -- gosu $uid:$uid "$@"
fi

exec "$@" $WIREMOCK_OPTIONS

0 comments on commit b6dcacf

Please sign in to comment.