github.com/fr-nvriep/migrate/v4@v4.3.2/Dockerfile (about)

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