mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 07:24:31 +01:00
fix: Dockerfile caching
This commit is contained in:
@@ -11,16 +11,17 @@ ENV GOPATH=/root/go
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
COPY agent ./agent
|
||||
COPY internal/dnsproviders ./internal/dnsproviders
|
||||
|
||||
RUN go mod download -x
|
||||
# remove godoxy stuff from go.mod first
|
||||
RUN sed -i '/^module github\.com\/yusing\/go-proxy/!{/github\.com\/yusing\/go-proxy/d}' go.mod && \
|
||||
go mod download -x
|
||||
|
||||
# Stage 2: builder
|
||||
FROM deps AS builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
COPY Makefile ./
|
||||
COPY cmd ./cmd
|
||||
COPY internal ./internal
|
||||
|
||||
Reference in New Issue
Block a user