Skip to content

Commit 2506feb

Browse files
committed
testing dockerfile
1 parent 7ff6e5d commit 2506feb

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
FROM golang:1.24
1+
FROM golang:1.24 AS builder
22

33
WORKDIR /app
4+
COPY . .
45

5-
COPY go.mod go.sum ./
6-
7-
RUN go mod download
6+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
87

9-
COPY . .
8+
FROM alpine:latest
109

11-
RUN CGO_ENABLED=0 GOOS=linux go build -o /secured-signal-api
10+
RUN apk --no-cache add ca-certificates
1211

13-
ENV PORT=8880
12+
WORKDIR /root/
1413

15-
EXPOSE ${PORT}
14+
COPY --from=builder /app/app .
1615

17-
CMD ["/secured-signal-api"]
16+
CMD ["./app"]

0 commit comments

Comments
 (0)