mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-22 20:24:03 +02:00
fix: Dockerfile
This commit is contained in:
parent
01179adfa8
commit
90ba355d16
1 changed files with 6 additions and 8 deletions
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}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue