mirror of
https://github.com/hanzoai/migrate.git
synced 2026-09-30 22:55:10 +00:00
Drop `toolchain` module directive to favor default/auto behavior See also: https://github.com/golang-migrate/migrate/pull/1183
27 lines
495 B
Docker
27 lines
495 B
Docker
FROM golang:1.24-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.linux-386 /usr/local/bin/migrate
|
|
RUN ln -s /usr/local/bin/migrate /migrate
|
|
|
|
ENTRYPOINT ["migrate"]
|
|
CMD ["--help"]
|