mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-19 23:24:44 +08:00
update Makefile
This commit is contained in:
@@ -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
|
||||||
|
5
Makefile
5
Makefile
@@ -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)
|
||||||
|
Reference in New Issue
Block a user