From 222cd670f2f039a3314fb2976f0eab71918fba10 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Mon, 15 Apr 2019 00:51:41 +0800 Subject: [PATCH] Dockerfile: add tini as entrypoint --- Dockerfile | 9 ++++++--- Dockerfile-alpine | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73b4e3a..8da1698 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,8 +33,11 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/ttyd -EXPOSE 7681 +ENV TINI_VERSION v0.18.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini +RUN chmod +x /tini -ENTRYPOINT ["ttyd"] +EXPOSE 7681 -CMD ["bash"] +ENTRYPOINT ["/tini", "--"] +CMD ["ttyd", "bash"] diff --git a/Dockerfile-alpine b/Dockerfile-alpine index b427373..f5964d8 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -4,10 +4,10 @@ LABEL maintainer "Shuanglei Tao - tsl0922@gmail.com" \ RUN apk add --no-cache \ bash \ + tini \ ttyd EXPOSE 7681 -ENTRYPOINT ["ttyd"] - -CMD ["bash"] +ENTRYPOINT ["/sbin/tini", "--"] +CMD ["ttyd", "bash"] -- 2.43.4