Chore: adjust Dockerfile

This commit is contained in:
xjasonlyu
2022-03-26 14:34:26 +08:00
parent c68dd0771e
commit 7bbae5549d
+5 -6
View File
@@ -1,17 +1,16 @@
FROM golang:alpine AS builder
WORKDIR /tun2socks-src
COPY . /tun2socks-src
WORKDIR /src
COPY . /src
RUN apk add --no-cache make git \
&& make tun2socks \
&& mv ./build/tun2socks /tun2socks
RUN apk add --update --no-cache make git \
&& make tun2socks
FROM alpine:latest
LABEL org.opencontainers.image.source="https://github.com/xjasonlyu/tun2socks"
COPY docker/entrypoint.sh /entrypoint.sh
COPY --from=builder /tun2socks /usr/bin/tun2socks
COPY --from=builder /src/build/tun2socks /usr/bin/tun2socks
RUN apk add --update --no-cache iptables iproute2 \
&& chmod +x /entrypoint.sh