mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-12 08:00:04 +01:00
25 lines
497 B
Docker
25 lines
497 B
Docker
FROM golang:1.5.1
|
|
|
|
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 \
|
|
golang.org/x/tools/cmd/vet
|
|
|
|
# copy source files
|
|
COPY . $GOPATH/src/github.com/amacneil/dbmate
|
|
WORKDIR $GOPATH/src/github.com/amacneil/dbmate
|
|
|
|
# build
|
|
RUN go get -d -t -v
|
|
RUN go install -v
|
|
|
|
CMD dbmate
|