Skip to content

Commit da595e4

Browse files
Added an entrypoint script
Fixes #1039
1 parent b374b8c commit da595e4

File tree

19 files changed

+114
-0
lines changed

19 files changed

+114
-0
lines changed

10/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
6868
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
6969
&& apk del .build-deps-yarn
7070

71+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
72+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
73+
&& ln -s usr/local/bin/docker-entrypoint.sh /
74+
75+
ENTRYPOINT ["docker-entrypoint.sh"]
76+
7177
CMD [ "node" ]

10/jessie-slim/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ RUN set -ex \
6464
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6565
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6666

67+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
68+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
69+
&& ln -s usr/local/bin/docker-entrypoint.sh /
70+
71+
ENTRYPOINT ["docker-entrypoint.sh"]
72+
6773
CMD [ "node" ]

10/jessie/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,10 @@ RUN set -ex \
6161
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6262
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6363

64+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
65+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
66+
&& ln -s usr/local/bin/docker-entrypoint.sh /
67+
68+
ENTRYPOINT ["docker-entrypoint.sh"]
69+
6470
CMD [ "node" ]

10/stretch-slim/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ RUN set -ex \
6464
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6565
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6666

67+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
68+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
69+
&& ln -s usr/local/bin/docker-entrypoint.sh /
70+
71+
ENTRYPOINT ["docker-entrypoint.sh"]
72+
6773
CMD [ "node" ]

10/stretch/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,10 @@ RUN set -ex \
6161
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6262
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6363

64+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
65+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
66+
&& ln -s usr/local/bin/docker-entrypoint.sh /
67+
68+
ENTRYPOINT ["docker-entrypoint.sh"]
69+
6470
CMD [ "node" ]

11/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
6868
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
6969
&& apk del .build-deps-yarn
7070

71+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
72+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
73+
&& ln -s usr/local/bin/docker-entrypoint.sh /
74+
75+
ENTRYPOINT ["docker-entrypoint.sh"]
76+
7177
CMD [ "node" ]

11/stretch-slim/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ RUN set -ex \
6464
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6565
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6666

67+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
68+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
69+
&& ln -s usr/local/bin/docker-entrypoint.sh /
70+
71+
ENTRYPOINT ["docker-entrypoint.sh"]
72+
6773
CMD [ "node" ]

11/stretch/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,10 @@ RUN set -ex \
6161
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6262
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6363

64+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
65+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
66+
&& ln -s usr/local/bin/docker-entrypoint.sh /
67+
68+
ENTRYPOINT ["docker-entrypoint.sh"]
69+
6470
CMD [ "node" ]

12/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
6868
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
6969
&& apk del .build-deps-yarn
7070

71+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
72+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
73+
&& ln -s usr/local/bin/docker-entrypoint.sh /
74+
75+
ENTRYPOINT ["docker-entrypoint.sh"]
76+
7177
CMD [ "node" ]

12/stretch-slim/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ RUN set -ex \
6464
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
6565
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
6666

67+
RUN printf '#!/bin/sh\nset -e\n\nif [ "${1#-}" != "$1" ] || [ -z "$(which $1)" ]; then\n set -- node "$@"\nfi\n\nexec "$@"' > /usr/local/bin/docker-entrypoint.sh \
68+
&& cmod +x /usr/local/bin/docker-entrypoint.sh \
69+
&& ln -s usr/local/bin/docker-entrypoint.sh /
70+
71+
ENTRYPOINT ["docker-entrypoint.sh"]
72+
6773
CMD [ "node" ]

0 commit comments

Comments
 (0)