File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
# syntax=docker/dockerfile:1
2
2
3
3
# Build the application from source
4
- FROM golang:1.22.0 AS build-stage
5
- WORKDIR /app
4
+ FROM golang:1.22.1 AS build-stage
5
+ WORKDIR /app
6
6
7
- COPY go.mod go.sum ./
8
- RUN go mod download
7
+ COPY go.mod go.sum ./
8
+ RUN go mod download
9
9
10
- COPY . .
10
+ COPY . .
11
11
12
- RUN CGO_ENABLED=0 GOOS=linux go build -o /api ./cmd/main.go
12
+ RUN CGO_ENABLED=0 GOOS=linux go build -o /api ./cmd/main.go
13
13
14
- # Run the tests in the container
14
+ # Run the tests in the container
15
15
FROM build-stage AS run-test-stage
16
- RUN go test -v ./...
16
+ RUN go test -v ./...
17
17
18
18
# Deploy the application binary into a lean image
19
19
FROM scratch AS build-release-stage
20
- WORKDIR /
20
+ WORKDIR /
21
21
22
- COPY --from=build-stage /api /api
22
+ COPY --from=build-stage /api /api
23
23
24
- EXPOSE 4001
24
+ EXPOSE 4001
25
25
26
- ENTRYPOINT ["/api" ]
26
+ ENTRYPOINT ["/api" ]
You can’t perform that action at this time.
0 commit comments