From: Shuanglei Tao Date: Sun, 14 Apr 2019 16:51:41 +0000 (+0800) Subject: Dockerfile: add tini as entrypoint X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=222cd670f2f039a3314fb2976f0eab71918fba10;p=ttyd.git Dockerfile: add tini as entrypoint --- 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"]