-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (21 loc) · 786 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:1.7.4
MAINTAINER [email protected]
ENV OS "darwin linux windows"
ENV ARCH "amd64"
COPY . ${GOPATH}/src/github.com/denverdino/docker-machine-driver-aliyunecs
WORKDIR ${GOPATH}/src/github.com/denverdino/docker-machine-driver-aliyunecs
RUN set -ex \
&& uname -a \
&& go version \
&& go env \
&& go get ./... \
&& go vet ./...
RUN dmver=$(cd $GOPATH/src/github.com/docker/machine && git describe --abbrev=0 --tags) \
&& echo "VERSION docker-machine '$dmver'"
RUN for GOOS in $OS; do \
arch="$GOOS-$ARCH" \
&& binary="bin/docker-machine-driver-aliyunecs.$arch" \
&& echo "Building $binary" \
&& GOOS=$GOOS GOARCH=$GOARCH go build -o $binary \
&& tar czvf bin/docker-machine-driver-aliyunecs_$arch.tgz $binary; \
done