Skip to content

Commit

Permalink
Added docker-entrypoint.sh based on feedback: docker-library/official…
Browse files Browse the repository at this point in the history
  • Loading branch information
r2-lf committed Sep 3, 2020
1 parent 4405a06 commit cd21340
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
5 changes: 3 additions & 2 deletions 3.10.x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ ARG MYSQL_SHA256=f93c6d717fff1bdc8941f0feba66ac13692e58dc382ca4b543cabbdb150d8bf
RUN wget -O /liquibase/lib/mysql.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.19/mysql-connector-java-8.0.19.jar \
&& echo "$MYSQL_SHA256 /liquibase/lib/mysql.jar" | sha256sum -c -

ENTRYPOINT ["/liquibase/liquibase"]
CMD ["--help"]
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["--help"]
9 changes: 9 additions & 0 deletions 3.10.x/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

# first arg is `-*` (picks up `--*`, too)
if [ "${1#-}" != "$1" ]; then
set -- /liquibase/liquibase "$@"
fi

exec "$@"
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ ARG MYSQL_SHA256=f93c6d717fff1bdc8941f0feba66ac13692e58dc382ca4b543cabbdb150d8bf
RUN wget -O /liquibase/lib/mysql.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.19/mysql-connector-java-8.0.19.jar \
&& echo "$MYSQL_SHA256 /liquibase/lib/mysql.jar" | sha256sum -c -

ENTRYPOINT ["/liquibase/liquibase"]
CMD ["--help"]
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["--help"]
9 changes: 9 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

# first arg is `-*` (picks up `--*`, too)
if [ "${1#-}" != "$1" ]; then
set -- /liquibase/liquibase "$@"
fi

exec "$@"

0 comments on commit cd21340

Please sign in to comment.