mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-31 11:52:14 +00:00
docker support
This commit is contained in:
parent
05cb35fabb
commit
c0c7fda891
3 changed files with 81 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
####################################################################################################
|
||||
## Builder
|
||||
####################################################################################################
|
||||
FROM rust:latest AS builder
|
||||
|
||||
WORKDIR /worker
|
||||
COPY ./ .
|
||||
RUN cargo build --release --target x86_64-unknown-linux-gnu
|
||||
|
||||
|
||||
####################################################################################################
|
||||
## Final image
|
||||
####################################################################################################
|
||||
FROM ubuntu:latest
|
||||
WORKDIR /app
|
||||
|
||||
ENV TUN=tun0
|
||||
ENV PROXY=
|
||||
ENV DNS=virtual
|
||||
ENV MODE=auto
|
||||
ENV BYPASS_IP=
|
||||
|
||||
RUN apt update && apt install -y iproute2 curl && apt clean all
|
||||
|
||||
COPY --from=builder /worker/target/x86_64-unknown-linux-gnu/release/tun2proxy /usr/bin/tun2proxy
|
||||
COPY --from=builder /worker/docker/entrypoint.sh /app
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue