-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
qingbo
committed
Aug 29, 2023
0 parents
commit c68c4c0
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |