Add docker runtime image (#21)

Closes #17
This commit is contained in:
Adrian Macneil 2018-01-07 19:08:43 -08:00 committed by GitHub
parent f150d6aeff
commit 4e01c75eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 19 deletions

View file

@ -13,14 +13,14 @@ container:
$(DC) up -d
lint:
$(DC) run dbmate golint -set_exit_status $(PACKAGES)
$(DC) run dbmate go vet $(PACKAGES)
$(DC) run dbmate errcheck $(PACKAGES)
$(DC) run --rm dbmate golint -set_exit_status $(PACKAGES)
$(DC) run --rm dbmate go vet $(PACKAGES)
$(DC) run --rm dbmate errcheck $(PACKAGES)
test:
$(DC) run dbmate go test -v $(PACKAGES)
$(DC) run --rm dbmate go test -v $(PACKAGES)
build: clean
$(DC) run -e GOARCH=amd64 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-amd64 ./cmd/dbmate
$(DC) run --rm -e GOARCH=amd64 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-amd64 ./cmd/dbmate
# musl target does not support sqlite
$(DC) run -e GOARCH=amd64 -e CGO_ENABLED=0 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-musl-amd64 ./cmd/dbmate
$(DC) run --rm -e GOARCH=amd64 -e CGO_ENABLED=0 dbmate go build $(BUILD_FLAGS) -o dist/dbmate-linux-musl-amd64 ./cmd/dbmate