From 8f70e298bf40a9ce268b968797a9c93c1f3fce79 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Thu, 29 Jan 2015 15:37:22 -0800 Subject: [PATCH] Update Dockerfile to use Makefile to build binary Signed-off-by: Stephen J Day --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30363eae8..881bb90dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,13 @@ FROM golang:1.4 ENV CONFIG_PATH /etc/docker/registry/config.yml -RUN mkdir -pv "$(dirname $CONFIG_PATH)" - ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution +ENV GOPATH $DISTRIBUTION_DIR/Godeps/_workspace:$GOPATH + WORKDIR $DISTRIBUTION_DIR COPY . $DISTRIBUTION_DIR -ENV GOPATH $GOPATH:$DISTRIBUTION_DIR/Godeps/_workspace - -RUN go install -v ./cmd/registry - +RUN make PREFIX=/go clean binaries +RUN mkdir -pv "$(dirname $CONFIG_PATH)" RUN cp -lv ./cmd/registry/config.yml $CONFIG_PATH EXPOSE 5000