update Makefile

This commit is contained in:
Jason
2020-08-31 14:16:26 +08:00
parent 92564a7046
commit 8b9b1027b9
2 changed files with 4 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ RUN apk add --update --no-cache \
gcc git make musl-dev \ gcc git make musl-dev \
&& go mod download \ && go mod download \
&& go get -u github.com/gobuffalo/packr/v2/packr2 \ && go get -u github.com/gobuffalo/packr/v2/packr2 \
&& packr2 && packr2 clean && make \ && make \
&& /tun2socks-src/bin/tun2socks -version && /tun2socks-src/bin/tun2socks -version
FROM alpine:latest FROM alpine:latest
@@ -15,7 +15,7 @@ FROM alpine:latest
COPY ./entrypoint.sh / COPY ./entrypoint.sh /
COPY --from=builder /tun2socks-src/bin/tun2socks /tun2socks 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 && chmod +x /entrypoint.sh
ENV TUN tun0 ENV TUN tun0

View File

@@ -7,10 +7,9 @@ GOBUILD=go build -trimpath -ldflags '-s -w -extldflags "-static" -X "github.com
all: build all: build
build: build:
cd component/session && packr2
cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -o $(BINDIR)/$(NAME) cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -o $(BINDIR)/$(NAME)
cd component/session && packr2 clean
debug:
cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -race -o $(BINDIR)/$(NAME)
clean: clean:
rm -rf $(BINDIR) rm -rf $(BINDIR)