mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:48:49 +02:00
fix: Dockerfile
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -6,14 +6,6 @@ HEALTHCHECK NONE
|
|||||||
# trunk-ignore(hadolint/DL3018)
|
# trunk-ignore(hadolint/DL3018)
|
||||||
RUN apk add --no-cache tzdata make libcap-setcap
|
RUN apk add --no-cache tzdata make libcap-setcap
|
||||||
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
# Only copy go.mod and go.sum initially for better caching
|
|
||||||
COPY go.mod go.sum /src/
|
|
||||||
|
|
||||||
ENV GOPATH=/root/go
|
|
||||||
RUN go mod download -x
|
|
||||||
|
|
||||||
# Stage 2: builder
|
# Stage 2: builder
|
||||||
FROM deps AS builder
|
FROM deps AS builder
|
||||||
|
|
||||||
@@ -25,6 +17,12 @@ COPY internal ./internal
|
|||||||
COPY pkg ./pkg
|
COPY pkg ./pkg
|
||||||
COPY agent ./agent
|
COPY agent ./agent
|
||||||
|
|
||||||
|
# Only copy go.mod and go.sum initially for better caching
|
||||||
|
COPY go.mod go.sum /src/
|
||||||
|
|
||||||
|
ENV GOPATH=/root/go
|
||||||
|
RUN go mod download -x
|
||||||
|
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ENV VERSION=${VERSION}
|
ENV VERSION=${VERSION}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user