Dockerfile: add tini as entrypoint

This commit is contained in:
Shuanglei Tao
2019-04-15 00:51:41 +08:00
parent 6e3b3fad56
commit 222cd670f2
2 changed files with 9 additions and 6 deletions

View File

@@ -33,8 +33,11 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/ttyd
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
EXPOSE 7681
ENTRYPOINT ["ttyd"]
CMD ["bash"]
ENTRYPOINT ["/tini", "--"]
CMD ["ttyd", "bash"]

View File

@@ -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"]