Feature: repalce dep with go module
This commit is contained in:
@ -2,11 +2,9 @@ FROM golang:latest as builder
|
||||
RUN wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz -O /tmp/GeoLite2-Country.tar.gz && \
|
||||
tar zxvf /tmp/GeoLite2-Country.tar.gz -C /tmp && \
|
||||
cp /tmp/GeoLite2-Country_*/GeoLite2-Country.mmdb /Country.mmdb
|
||||
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \
|
||||
mkdir -p /go/src/github.com/Dreamacro/clash
|
||||
WORKDIR /go/src/github.com/Dreamacro/clash
|
||||
COPY . /go/src/github.com/Dreamacro/clash
|
||||
RUN dep ensure && \
|
||||
WORKDIR /clash-src
|
||||
COPY . /clash-src
|
||||
RUN go mod download && \
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o /clash && \
|
||||
chmod +x /clash
|
||||
|
||||
|
Reference in New Issue
Block a user