Files
zeekayandHanzo Dev ea38ee709f Name the binary for what it is
build-docker compiles without GOOS or GOARCH, so the output is native to
whatever built it. The old name said linux-386 and reads as an
architecture bug on every audit of this tree.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-08 21:26:44 -07:00

27 lines
487 B
Docker

FROM golang:1.26.4-alpine3.21 AS builder
ARG VERSION
RUN apk add --no-cache git gcc musl-dev make
WORKDIR /go/src/github.com/golang-migrate/migrate
ENV GO111MODULE=on
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN make build-docker
FROM alpine:3.21
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/golang-migrate/migrate/build/migrate /usr/local/bin/migrate
RUN ln -s /usr/local/bin/migrate /migrate
ENTRYPOINT ["migrate"]
CMD ["--help"]