File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
FROM golang:1.10-alpine3.7 AS downloader
2
2
ARG VERSION
3
3
4
- RUN apk add --no-cache git gcc musl-dev
4
+ RUN apk add --no-cache git gcc musl-dev curl
5
+
6
+ RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 && chmod +x /usr/local/bin/dep
5
7
6
8
WORKDIR /go/src/github.com/golang-migrate/migrate
7
9
8
- ENV DATABASES= "postgres mysql redshift cassandra spanner cockroachdb clickhouse"
9
- ENV SOURCES= "file go-bindata github aws-s3 google-cloud-storage"
10
+ COPY Gopkg.toml Gopkg.lock ./
11
+ RUN dep ensure -vendor-only
10
12
11
13
COPY *.go ./
12
14
COPY cli ./cli
13
15
COPY database ./database
14
16
COPY source ./source
15
17
16
- RUN go get -v ./... && \
17
- go get -u github.com/fsouza/fake-gcs-server/fakestorage && \
18
- go get -u github.com/kshvakov/clickhouse && \
19
- go build -a -o build/migrate.linux-386 -ldflags="-X main.Version=${VERSION}" -tags "$DATABASES $SOURCES" ./cli
18
+ ENV DATABASES= "postgres mysql redshift cassandra spanner cockroachdb clickhouse"
19
+ ENV SOURCES= "file go-bindata github aws-s3 google-cloud-storage"
20
+
21
+ RUN go build -a -o build/migrate.linux-386 -ldflags="-X main.Version=${VERSION}" -tags "$DATABASES $SOURCES" ./cli
20
22
21
23
FROM alpine:3.7
22
24
@@ -26,4 +28,4 @@ COPY --from=downloader /go/src/github.com/golang-migrate/migrate/build/migrate.l
26
28
RUN chmod u+x /migrate
27
29
28
30
ENTRYPOINT ["/migrate" ]
29
- CMD ["--help" ]
31
+ CMD ["--help" ]
You can’t perform that action at this time.
0 commit comments