From 8ccfe3d5e832ef79b743a783b5c24ddbe8159ea5 Mon Sep 17 00:00:00 2001 From: jackgr Date: Fri, 29 Jan 2016 11:53:02 -0800 Subject: [PATCH] Fixed Dockerfile bugs. --- manager/Dockerfile | 24 +++++++----------------- resourcifier/Dockerfile | 7 +++++-- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/manager/Dockerfile b/manager/Dockerfile index ca13c5b3a..cf4ba8757 100644 --- a/manager/Dockerfile +++ b/manager/Dockerfile @@ -26,26 +26,16 @@ ENV KUBE_VERSION v1.0.5 RUN curl -fsSL -o kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubectl \ && chmod +x kubectl -RUN mkdir -p "$GOPATH/src/github.com" && chmod 777 "$GOPATH/src/github.com" +COPY . "$GOPATH"/src -WORKDIR "$GOPATH/src/github.com" +WORKDIR "$GOPATH"/src/manager -RUN mkdir -p manager && chmod 777 manager -COPY manager manager +RUN go-wrapper download +RUN go-wrapper install -RUN mkdir -p util && chmod 777 util -COPY util util - -RUN mkdir -p version && chmod 777 version -COPY version version - -WORKDIR "$GOPATH" - -RUN mkdir -p "$GOPATH/src/github.com" && chmod 777 "$GOPATH/src/github.com" - -RUN go-wrapper download github.com/kubernetes/deployment-manager/manager/... -RUN go-wrapper install github.com/kubernetes/deployment-manager/manager/... +RUN cp "$GOPATH"/bin/manager /usr/local/bin +RUN /bin/rm -rf "$GOPATH" EXPOSE 8080 -ENTRYPOINT ["bin/manager", "--kubectl=/usr/local/bin/kubectl"] +ENTRYPOINT ["/usr/local/bin/manager", "--kubectl=/usr/local/bin/kubectl"] diff --git a/resourcifier/Dockerfile b/resourcifier/Dockerfile index 70e56d3f4..bc5ce7bcb 100644 --- a/resourcifier/Dockerfile +++ b/resourcifier/Dockerfile @@ -25,13 +25,16 @@ ENV KUBE_VERSION v1.0.5 RUN curl -fsSL -o kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubectl \ && chmod +x kubectl -COPY . "$GOPATH"/src/resourcifier +COPY . "$GOPATH"/src WORKDIR "$GOPATH"/src/resourcifier RUN go-wrapper download RUN go-wrapper install +RUN cp "$GOPATH"/bin/resourcifier /usr/local/bin +RUN /bin/rm -rf "$GOPATH" + EXPOSE 8080 -ENTRYPOINT ["/go/bin/resourcifier", "--kubectl=/usr/local/bin/kubectl"] +ENTRYPOINT ["/usr/local/bin/resourcifier", "--kubectl=/usr/local/bin/kubectl"]