Skip to content

Commit

Permalink
fix dockerfile version and deps
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre MARRE <me@itsalex.fr>
  • Loading branch information
Its-Alex committed May 10, 2018
1 parent a0b03c3 commit 2c02e3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM golang:1.10-alpine3.7 AS downloader
ARG VERSION

RUN apk add --no-cache git gcc musl-dev

WORKDIR /go/src/github.com/golang-migrate/migrate

ENV DEPS="postgres mysql redshift cassandra spanner cockroachdb clickhouse file go-bindata github aws-s3 google-cloud-storage"

COPY *.go ./
COPY cli ./cli
COPY database ./database
Expand All @@ -12,7 +15,7 @@ COPY source ./source
RUN go get -v ./... && \
go get -u github.com/fsouza/fake-gcs-server/fakestorage && \
go get -u github.com/kshvakov/clickhouse && \
GOOS=linux GOARCH=386 go build -a -o build/migrate.linux-386 -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' ./cli
go build -a -o build/migrate.linux-386 -ldflags="-X main.Version=${VERSION}" -tags "$DEPS" ./cli

FROM alpine:3.7

Expand Down
2 changes: 1 addition & 1 deletion docker-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && \
docker build . -t migrate/migrate:"$TRAVIS_TAG" && \
docker build --build-arg VERSION="$TRAVIS_TAG" . -t migrate/migrate:"$TRAVIS_TAG" && \
docker push migrate/migrate:"$TRAVIS_TAG"

0 comments on commit 2c02e3c

Please sign in to comment.