FROM golang:1.27.1-alpine3.24 AS build ENV CGO_ENABLED=0 RUN go install github.com/pressly/goose/v3/cmd/goose@v3.28.0 FROM alpine:3.24 COPY --from=build /go/bin/goose /usr/local/bin/goose COPY db/migrations /migrations ENTRYPOINT ["sh", "-c", "goose -dir /migrations postgres \"$(cat /run/secrets/database_url)\" up"]