diff --git a/Dockerfile_build b/Dockerfile_build index 64d19d26..23b27630 100644 --- a/Dockerfile_build +++ b/Dockerfile_build @@ -1,8 +1,16 @@ -FROM ubuntu:latest - +FROM golang:1.22-alpine as builder WORKDIR /app -COPY certimate /app/certimate +COPY ../. /app/ + +RUN go build -o certimate + + +FROM alpine:latest + +WORKDIR /app + +COPY --from=builder /app/certimate . ENTRYPOINT ["./certimate", "serve", "--http", "0.0.0.0:8090"] \ No newline at end of file