dbmate/Dockerfile
2018-01-07 12:52:10 -08:00

24 lines
521 B
Docker

FROM golang:1.9
# required to force cgo (for sqlite driver) with cross compile
ENV CGO_ENABLED 1
# i386 cross compilation
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y libc6-dev-i386 && \
rm -rf /var/lib/apt/lists/*
# development dependencies
RUN go get \
github.com/golang/lint/golint \
github.com/kisielk/errcheck
# copy source files
COPY . $GOPATH/src/github.com/amacneil/dbmate
WORKDIR $GOPATH/src/github.com/amacneil/dbmate
# build
RUN go install -v ./cmd/dbmate
CMD dbmate