You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build/Dockerfile
+13-16Lines changed: 13 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,25 @@
1
-
FROM golang:1.24-bookworm as builder
1
+
FROM golang:1.24-bookworm AS builder
2
2
3
-
WORKDIR /ctf01d.ru
3
+
WORKDIR /app
4
4
5
-
COPY./go.mod ./
6
-
COPY ./go.sum ./
5
+
COPY go.mod go.sum ./
6
+
RUN go mod download
7
7
8
-
RUN go mod tidy
9
-
10
-
COPY ./ ./
8
+
COPY . .
11
9
12
10
ARG VERSION
13
11
ARG BUILDTIME
14
-
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-X 'ctf01d/internal/handler.version=${VERSION}' -X ctf01d/internal/handler.buildTime=${BUILDTIME}" -o server cmd/main.go
12
+
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-X 'ctf01d/internal/handler.version=${VERSION}' -X 'ctf01d/internal/handler.buildTime=${BUILDTIME}'" -o server ./cmd/main.go
0 commit comments