Skip to content

Commit

Permalink
Alpine Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
plutov committed Aug 12, 2024
1 parent b495446 commit 97b0a6c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang:1.22-bookworm AS builder
FROM golang:1.22-alpine AS builder

RUN apk add build-base

WORKDIR /root

Expand All @@ -13,9 +15,10 @@ COPY ./migrations ./migrations
COPY ./surveys ./surveys-examples
RUN CGO_ENABLED=1 GOOS=linux go build -o api -tags enablecgo cmd/console-api/api.go

FROM debian:bookworm
FROM alpine:latest
RUN apk --no-cache add ca-certificates tzdata bash
WORKDIR /root
COPY --from=builder /root/api .
COPY --from=builder /root/api ./api
COPY --from=builder /root/migrations ./migrations
COPY --from=builder /root/surveys-examples ./surveys-examples

Expand Down

0 comments on commit 97b0a6c

Please sign in to comment.