github.com/solvedata/migrate/v4@v4.8.7-0.20201127053940-c9fba4ce569f/Dockerfile (about) 1 FROM golang:1.12-alpine3.10 AS downloader 2 ARG VERSION 3 4 RUN apk add --no-cache git gcc musl-dev 5 6 WORKDIR /go/src/github.com/solvedata/migrate 7 8 COPY . ./ 9 10 ENV GO111MODULE=on 11 ENV DATABASES="postgres mysql redshift cassandra spanner cockroachdb clickhouse mongodb sqlserver firebird" 12 ENV SOURCES="file go_bindata github github_ee aws_s3 google_cloud_storage godoc_vfs gitlab" 13 14 RUN go build -a -o build/migrate.linux-386 -ldflags="-s -w -X main.Version=${VERSION}" -tags "$DATABASES $SOURCES" ./cmd/migrate 15 16 FROM alpine:3.10 17 18 RUN apk add --no-cache ca-certificates 19 20 COPY --from=downloader /go/src/github.com/solvedata/migrate/build/migrate.linux-386 /migrate 21 22 ENTRYPOINT ["/migrate"] 23 CMD ["--help"]