From cd213406feea9dcdc9145008699a52500ae2d32b Mon Sep 17 00:00:00 2001 From: Robert Reeves Date: Thu, 3 Sep 2020 09:49:02 -0500 Subject: [PATCH] Added docker-entrypoint.sh based on feedback: https://github.com/docker-library/official-images/pull/8409 --- 3.10.x/Dockerfile | 5 +++-- 3.10.x/docker-entrypoint.sh | 9 +++++++++ Dockerfile | 5 +++-- docker-entrypoint.sh | 9 +++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 3.10.x/docker-entrypoint.sh create mode 100644 docker-entrypoint.sh diff --git a/3.10.x/Dockerfile b/3.10.x/Dockerfile index 6f419b12..5e6c5558 100644 --- a/3.10.x/Dockerfile +++ b/3.10.x/Dockerfile @@ -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"] \ No newline at end of file diff --git a/3.10.x/docker-entrypoint.sh b/3.10.x/docker-entrypoint.sh new file mode 100644 index 00000000..f26049ae --- /dev/null +++ b/3.10.x/docker-entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +# first arg is `-*` (picks up `--*`, too) +if [ "${1#-}" != "$1" ]; then + set -- /liquibase/liquibase "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 38bf05ba..e977d8e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 00000000..f26049ae --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +# first arg is `-*` (picks up `--*`, too) +if [ "${1#-}" != "$1" ]; then + set -- /liquibase/liquibase "$@" +fi + +exec "$@" \ No newline at end of file