Skip to content

Commit

Permalink
To optimize Docker image size.
Browse files Browse the repository at this point in the history
  • Loading branch information
usual2970 committed Aug 30, 2024
1 parent 78877d0 commit 6466d1f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile_build
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FROM ubuntu:latest
FROM golang:1.22-alpine as builder

WORKDIR /app

COPY ../. /app/

RUN go build -o certimate


FROM alpine:latest

WORKDIR /app

COPY certimate /app/certimate
COPY --from=builder /app/certimate .

ENTRYPOINT ["./certimate", "serve", "--http", "0.0.0.0:8090"]

0 comments on commit 6466d1f

Please sign in to comment.