mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-24 01:03:08 +08:00
Create Dockerfile
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
|
WORKDIR /tun2socks-src
|
||||||
|
COPY . /tun2socks-src
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
gcc \
|
||||||
|
musl-dev \
|
||||||
|
&& go mod download \
|
||||||
|
&& make build \
|
||||||
|
&& mv ./bin/tun2socks /tun2socks
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
COPY --from=builder /tun2socks /
|
||||||
|
ENTRYPOINT ["/tun2socks"]
|
Reference in New Issue
Block a user