Skip to content

Commit

Permalink
tuic in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
qingbo committed Aug 29, 2023
0 parents commit c68c4c0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit c68c4c0

Please sign in to comment.