From 7bbae5549ded9eaa42a5f148a012fd58d7e8a354 Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Sat, 26 Mar 2022 14:34:26 +0800 Subject: [PATCH] Chore: adjust Dockerfile --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e14c47..1c59834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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