summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile15
1 files changed, 5 insertions, 10 deletions
diff --git a/Dockerfile b/Dockerfile
index 39f0376..03603f4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,16 +1,11 @@
-FROM ubuntu:18.04
-RUN apt-get update && apt-get install -y autoconf automake curl cmake git libtool make \
- && git clone --depth=1 https://github.com/tsl0922/ttyd.git /ttyd \
- && cd /ttyd && env BUILD_TARGET=x86_64 WITH_SSL=true ./scripts/cross-build.sh
+FROM ubuntu:20.04
-FROM ubuntu:18.04
-COPY --from=0 /ttyd/build/ttyd /usr/bin/ttyd
-
-ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini /sbin/tini
-RUN chmod +x /sbin/tini
+ARG TARGETARCH
+COPY ./dist/${TARGETARCH}/ttyd /usr/bin/ttyd
+RUN apt-get update && apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/*
EXPOSE 7681
WORKDIR /root
-ENTRYPOINT ["/sbin/tini", "--"]
+ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["ttyd", "bash"]