summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Dockerfile15
-rw-r--r--Dockerfile-alpine14
-rw-r--r--Dockerfile.alpine11
3 files changed, 16 insertions, 24 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"]
diff --git a/Dockerfile-alpine b/Dockerfile-alpine
deleted file mode 100644
index 53266bb..0000000
--- a/Dockerfile-alpine
+++ /dev/null
@@ -1,14 +0,0 @@
-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 alpine:3.12
-COPY --from=0 /ttyd/build/ttyd /usr/bin/ttyd
-RUN apk add --no-cache bash tini
-
-EXPOSE 7681
-WORKDIR /root
-
-ENTRYPOINT ["/sbin/tini", "--"]
-CMD ["ttyd", "bash"]
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
new file mode 100644
index 0000000..844b53c
--- /dev/null
+++ b/Dockerfile.alpine
@@ -0,0 +1,11 @@
+FROM alpine
+
+ARG TARGETARCH
+COPY ./dist/${TARGETARCH}/ttyd /usr/bin/ttyd
+RUN apk add --no-cache bash tini
+
+EXPOSE 7681
+WORKDIR /root
+
+ENTRYPOINT ["/sbin/tini", "--"]
+CMD ["ttyd", "bash"]