From a2203a92a55a6ca95a237a5b54e16dc07dcc52ae Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 30 Jan 2015 17:41:53 -0800 Subject: [PATCH 1/2] Dockerfile: Statically compile the swarm binary. Signed-off-by: Andrea Luzzardi --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d7a25c53f0..272d441c15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY . /go/src/github.com/docker/swarm WORKDIR /go/src/github.com/docker/swarm ENV GOPATH $GOPATH:/go/src/github.com/docker/swarm/Godeps/_workspace -RUN go install -v +RUN CGO_ENABLED=0 go install -v -a -tags netgo -ldflags '-w' EXPOSE 2375 From 3da0aaf75380b3744c9b2a9b6fddc2258daa300b Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 30 Jan 2015 17:42:48 -0800 Subject: [PATCH 2/2] Dockerfile: Expose the swarm storage directory as a volume. Signed-off-by: Andrea Luzzardi --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 272d441c15..dc7dcbcc16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ ENV GOPATH $GOPATH:/go/src/github.com/docker/swarm/Godeps/_workspace RUN CGO_ENABLED=0 go install -v -a -tags netgo -ldflags '-w' EXPOSE 2375 +VOLUME $HOME/.swarm ENTRYPOINT ["swarm"] CMD ["--help"]