Skip to content

Commit

Permalink
allow to specify entrypoint using parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
VasekPurchart committed Apr 6, 2017
1 parent dd146a5 commit 879da8c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ VOLUME ["/composer", "/build"]

CMD ["--ansi", "-vvv", "build", "/build/satis.json", "/build/output"]

ENTRYPOINT ["/sbin/tini", "--", "/satis/bin/satis"]
ENTRYPOINT ["/sbin/tini", "--", "/satis/bin/docker-entrypoint"]
17 changes: 17 additions & 0 deletions bin/docker-entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
set -e

# first argument is a command or some option (-, --)
if \
[ "$1" = "add" ] \
|| [ "$1" = "build" ] \
|| [ "$1" = "help" ] \
|| [ "$1" = "init" ] \
|| [ "$1" = "list" ] \
|| [ "$1" = "purge" ] \
|| [ "${1#-}" != "$1" ] \
; then
set -- /satis/bin/satis "$@"
fi

exec "$@"

0 comments on commit 879da8c

Please sign in to comment.