Tweak Dockerfile for official image.

Replaced ADD with COPY per best practices article.  Removed unnecessary
Godeps install, and added a .dockerignore to shave off ~23M.

Signed-off-by: Peter Salvatore <peter@psftw.com>
This commit is contained in:
Peter Salvatore 2015-01-29 10:54:32 -05:00
parent 405494df65
commit c88039f619
2 changed files with 6 additions and 3 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
.git

View File

@ -1,10 +1,12 @@
FROM golang:1.3 FROM golang:1.3
ADD . /go/src/github.com/docker/swarm COPY . /go/src/github.com/docker/swarm
WORKDIR /go/src/github.com/docker/swarm WORKDIR /go/src/github.com/docker/swarm
RUN go get github.com/tools/godep ENV GOPATH $GOPATH:/go/src/github.com/docker/swarm/Godeps/_workspace
RUN godep go install RUN go install -v
EXPOSE 2375 EXPOSE 2375
ENTRYPOINT ["swarm"] ENTRYPOINT ["swarm"]
CMD ["--help"]