diff --git a/Dockerfile b/Dockerfile index b173d73..92c290a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apk add --update --no-cache \ gcc git make musl-dev \ && go mod download \ && go get -u github.com/gobuffalo/packr/v2/packr2 \ - && packr2 && packr2 clean && make \ + && make \ && /tun2socks-src/bin/tun2socks -version FROM alpine:latest @@ -15,7 +15,7 @@ FROM alpine:latest COPY ./entrypoint.sh / COPY --from=builder /tun2socks-src/bin/tun2socks /tun2socks -RUN apk add --update --no-cache iptables iproute2 ca-certificates\ +RUN apk add --update --no-cache iptables iproute2 \ && chmod +x /entrypoint.sh ENV TUN tun0 diff --git a/Makefile b/Makefile index 45a9eb5..7a65330 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,9 @@ GOBUILD=go build -trimpath -ldflags '-s -w -extldflags "-static" -X "github.com all: build build: + cd component/session && packr2 cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -o $(BINDIR)/$(NAME) - -debug: - cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -race -o $(BINDIR)/$(NAME) + cd component/session && packr2 clean clean: rm -rf $(BINDIR)