From 7e47b378c42b03ae6afae704c5bf5b724aae2b92 Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Thu, 23 May 2019 11:45:48 -0400 Subject: [PATCH] Added an entrypoint script Fixes #1039 --- 10/alpine/Dockerfile | 3 +++ 10/alpine/docker-entrypoint.sh | 8 ++++++++ 10/jessie-slim/Dockerfile | 3 +++ 10/jessie-slim/docker-entrypoint.sh | 8 ++++++++ 10/jessie/Dockerfile | 3 +++ 10/jessie/docker-entrypoint.sh | 8 ++++++++ 10/stretch-slim/Dockerfile | 3 +++ 10/stretch-slim/docker-entrypoint.sh | 8 ++++++++ 10/stretch/Dockerfile | 3 +++ 10/stretch/docker-entrypoint.sh | 8 ++++++++ 11/alpine/Dockerfile | 3 +++ 11/alpine/docker-entrypoint.sh | 8 ++++++++ 11/stretch-slim/Dockerfile | 3 +++ 11/stretch-slim/docker-entrypoint.sh | 8 ++++++++ 11/stretch/Dockerfile | 3 +++ 11/stretch/docker-entrypoint.sh | 8 ++++++++ 12/alpine/Dockerfile | 3 +++ 12/alpine/docker-entrypoint.sh | 8 ++++++++ 12/stretch-slim/Dockerfile | 3 +++ 12/stretch-slim/docker-entrypoint.sh | 8 ++++++++ 12/stretch/Dockerfile | 3 +++ 12/stretch/docker-entrypoint.sh | 8 ++++++++ 8/alpine/Dockerfile | 3 +++ 8/alpine/docker-entrypoint.sh | 8 ++++++++ 8/jessie-slim/Dockerfile | 3 +++ 8/jessie-slim/docker-entrypoint.sh | 8 ++++++++ 8/jessie/Dockerfile | 3 +++ 8/jessie/docker-entrypoint.sh | 8 ++++++++ 8/stretch-slim/Dockerfile | 3 +++ 8/stretch-slim/docker-entrypoint.sh | 8 ++++++++ 8/stretch/Dockerfile | 3 +++ 8/stretch/docker-entrypoint.sh | 8 ++++++++ Dockerfile-alpine.template | 3 +++ Dockerfile-debian.template | 3 +++ Dockerfile-slim.template | 3 +++ docker-entrypoint.sh | 8 ++++++++ update.sh | 1 + 37 files changed, 194 insertions(+) create mode 100755 10/alpine/docker-entrypoint.sh create mode 100755 10/jessie-slim/docker-entrypoint.sh create mode 100755 10/jessie/docker-entrypoint.sh create mode 100755 10/stretch-slim/docker-entrypoint.sh create mode 100755 10/stretch/docker-entrypoint.sh create mode 100755 11/alpine/docker-entrypoint.sh create mode 100755 11/stretch-slim/docker-entrypoint.sh create mode 100755 11/stretch/docker-entrypoint.sh create mode 100755 12/alpine/docker-entrypoint.sh create mode 100755 12/stretch-slim/docker-entrypoint.sh create mode 100755 12/stretch/docker-entrypoint.sh create mode 100755 8/alpine/docker-entrypoint.sh create mode 100755 8/jessie-slim/docker-entrypoint.sh create mode 100755 8/jessie/docker-entrypoint.sh create mode 100755 8/stretch-slim/docker-entrypoint.sh create mode 100755 8/stretch/docker-entrypoint.sh create mode 100755 docker-entrypoint.sh diff --git a/10/alpine/Dockerfile b/10/alpine/Dockerfile index 0014944c..e94f4b8d 100644 --- a/10/alpine/Dockerfile +++ b/10/alpine/Dockerfile @@ -68,4 +68,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/10/alpine/docker-entrypoint.sh b/10/alpine/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/10/alpine/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/10/jessie-slim/Dockerfile b/10/jessie-slim/Dockerfile index 50683286..d1c4ae27 100644 --- a/10/jessie-slim/Dockerfile +++ b/10/jessie-slim/Dockerfile @@ -64,4 +64,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/10/jessie-slim/docker-entrypoint.sh b/10/jessie-slim/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/10/jessie-slim/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/10/jessie/Dockerfile b/10/jessie/Dockerfile index d8a97562..ce6c0024 100644 --- a/10/jessie/Dockerfile +++ b/10/jessie/Dockerfile @@ -61,4 +61,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/10/jessie/docker-entrypoint.sh b/10/jessie/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/10/jessie/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/10/stretch-slim/Dockerfile b/10/stretch-slim/Dockerfile index 488f3f46..eeb1c411 100644 --- a/10/stretch-slim/Dockerfile +++ b/10/stretch-slim/Dockerfile @@ -64,4 +64,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/10/stretch-slim/docker-entrypoint.sh b/10/stretch-slim/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/10/stretch-slim/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/10/stretch/Dockerfile b/10/stretch/Dockerfile index a7f7ead5..8f9fdcc6 100644 --- a/10/stretch/Dockerfile +++ b/10/stretch/Dockerfile @@ -61,4 +61,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/10/stretch/docker-entrypoint.sh b/10/stretch/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/10/stretch/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/11/alpine/Dockerfile b/11/alpine/Dockerfile index 71086523..dff7d117 100644 --- a/11/alpine/Dockerfile +++ b/11/alpine/Dockerfile @@ -68,4 +68,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/11/alpine/docker-entrypoint.sh b/11/alpine/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/11/alpine/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/11/stretch-slim/Dockerfile b/11/stretch-slim/Dockerfile index 32200c11..2a390a92 100644 --- a/11/stretch-slim/Dockerfile +++ b/11/stretch-slim/Dockerfile @@ -64,4 +64,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/11/stretch-slim/docker-entrypoint.sh b/11/stretch-slim/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/11/stretch-slim/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/11/stretch/Dockerfile b/11/stretch/Dockerfile index 5c3a293b..68a39b8a 100644 --- a/11/stretch/Dockerfile +++ b/11/stretch/Dockerfile @@ -61,4 +61,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/11/stretch/docker-entrypoint.sh b/11/stretch/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/11/stretch/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/12/alpine/Dockerfile b/12/alpine/Dockerfile index 1a3ebdf9..6137c197 100644 --- a/12/alpine/Dockerfile +++ b/12/alpine/Dockerfile @@ -68,4 +68,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/12/alpine/docker-entrypoint.sh b/12/alpine/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/12/alpine/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/12/stretch-slim/Dockerfile b/12/stretch-slim/Dockerfile index 4cd61897..f6e1881b 100644 --- a/12/stretch-slim/Dockerfile +++ b/12/stretch-slim/Dockerfile @@ -64,4 +64,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/12/stretch-slim/docker-entrypoint.sh b/12/stretch-slim/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/12/stretch-slim/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/12/stretch/Dockerfile b/12/stretch/Dockerfile index bd6da866..dd9cb2b0 100644 --- a/12/stretch/Dockerfile +++ b/12/stretch/Dockerfile @@ -61,4 +61,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/12/stretch/docker-entrypoint.sh b/12/stretch/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/12/stretch/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/8/alpine/Dockerfile b/8/alpine/Dockerfile index 33603447..d74f387f 100644 --- a/8/alpine/Dockerfile +++ b/8/alpine/Dockerfile @@ -68,4 +68,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/8/alpine/docker-entrypoint.sh b/8/alpine/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/8/alpine/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/8/jessie-slim/Dockerfile b/8/jessie-slim/Dockerfile index 8cb11fc9..11d33313 100644 --- a/8/jessie-slim/Dockerfile +++ b/8/jessie-slim/Dockerfile @@ -64,4 +64,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/8/jessie-slim/docker-entrypoint.sh b/8/jessie-slim/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/8/jessie-slim/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/8/jessie/Dockerfile b/8/jessie/Dockerfile index 22b27e51..20ad522d 100644 --- a/8/jessie/Dockerfile +++ b/8/jessie/Dockerfile @@ -61,4 +61,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/8/jessie/docker-entrypoint.sh b/8/jessie/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/8/jessie/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/8/stretch-slim/Dockerfile b/8/stretch-slim/Dockerfile index 6443cbbc..6518417c 100644 --- a/8/stretch-slim/Dockerfile +++ b/8/stretch-slim/Dockerfile @@ -64,4 +64,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/8/stretch-slim/docker-entrypoint.sh b/8/stretch-slim/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/8/stretch-slim/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/8/stretch/Dockerfile b/8/stretch/Dockerfile index 48d07926..993bc508 100644 --- a/8/stretch/Dockerfile +++ b/8/stretch/Dockerfile @@ -61,4 +61,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/8/stretch/docker-entrypoint.sh b/8/stretch/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/8/stretch/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 69cb25d9..36d281b2 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -58,4 +58,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 425b982f..13ec6404 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -51,4 +51,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index bed6237c..89de3972 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -54,4 +54,7 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + CMD [ "node" ] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 00000000..de6fa8a9 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then + set -- node "$@" +fi + +exec "$@" diff --git a/update.sh b/update.sh index 5565383e..c10f685e 100755 --- a/update.sh +++ b/update.sh @@ -245,6 +245,7 @@ for version in "${versions[@]}"; do template_file="${parentpath}/Dockerfile-slim.template" fi + [ "$variant" != "onbuild" ] && cp "${parentpath}/docker-entrypoint.sh" "${version}/${variant}/docker-entrypoint.sh" if [ "${update_version}" -eq 0 ] && [ "${update_variant}" -eq 0 ]; then update_node_version "${baseuri}" "${versionnum}" "${template_file}" "${version}/${variant}/Dockerfile" "${variant}" & fi