From c68c4c0b94b647179fcdcfa940ad4b0bd8e984c6 Mon Sep 17 00:00:00 2001 From: qingbo Date: Tue, 29 Aug 2023 14:24:33 +0800 Subject: [PATCH] tuic in docker --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..be9da17 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +ARG TUIC_VERSION=1.0.0 + +FROM rust:1.72-bookworm as builder + +ARG TUIC_VERSION + +RUN apt update \ + && apt install wget -y \ + && wget https://github.com/EAimTY/tuic/archive/refs/tags/tuic-server-${TUIC_VERSION}.tar.gz -O tuic-server-${TUIC_VERSION}.tar.gz \ + && tar -zxvf tuic-server-${TUIC_VERSION}.tar.gz + +WORKDIR /tuic-tuic-server-${TUIC_VERSION} + +RUN cargo build --release + +FROM debian:bookworm + +ARG TUIC_VERSION +COPY --from=builder /tuic-tuic-server-${TUIC_VERSION}/target/release/tuic-server /usr/local/bin/ + +ENTRYPOINT ["/usr/local/bin/tuic-server"] + +CMD ["--help"]