Skip to content

Commit 4f06dba

Browse files
committed
Pure docker build set up
1 parent 7fe5189 commit 4f06dba

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
FROM docker.io/golang:1.23.4-alpine3.21 as builder
2+
3+
WORKDIR /workspace
4+
5+
COPY qubership-apihub-service qubership-apihub-service
6+
7+
WORKDIR /workspace/qubership-apihub-service
8+
9+
RUN set GOSUMDB=off && set CGO_ENABLED=0 && set GOOS=linux && go mod tidy && go mod download && go build .
10+
111
FROM docker.io/golang:1.23.4-alpine3.21
212

313
MAINTAINER qubership.org
@@ -8,7 +18,7 @@ USER root
818

919
RUN apk --no-cache add curl
1020

11-
ADD qubership-apihub-service/qubership-apihub-service ./qubership-apihub-service
21+
COPY --from=builder /workspace/qubership-apihub-service/qubership-apihub-service ./qubership-apihub-service
1222
ADD qubership-apihub-service/static ./static
1323
ADD qubership-apihub-service/resources ./resources
1424
ADD docs/api ./api

0 commit comments

Comments
 (0)