From 9a45eaedbdf540f8253cfcbb9ab4d5f8f74674e4 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 2 Feb 2016 23:41:03 -0800 Subject: [PATCH] use golang:1.5.3-alpine in Dockerfile Signed-off-by: Victor Vieux --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index da37763061..62d32c9196 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,15 @@ -FROM golang:1.5.3 +FROM golang:1.5.3-alpine COPY . /go/src/github.com/docker/swarm WORKDIR /go/src/github.com/docker/swarm ENV GOPATH /go/src/github.com/docker/swarm/Godeps/_workspace:$GOPATH -RUN CGO_ENABLED=0 go install -v -a -tags netgo -installsuffix netgo -ldflags "-w -X github.com/docker/swarm/version.GITCOMMIT `git rev-parse --short HEAD` -X github.com/docker/swarm/version.BUILDTIME \"`date -u`\"" + +RUN set -ex \ + && apk add --no-cache --virtual .build-deps \ + git \ + && CGO_ENABLED=0 go install -v -a -tags netgo -installsuffix netgo -ldflags "-w -X github.com/docker/swarm/version.GITCOMMIT `git rev-parse --short HEAD` -X github.com/docker/swarm/version.BUILDTIME \"`date -u`\"" \ + && apk del .build-deps ENV SWARM_HOST :2375 EXPOSE 2375