dockerfile: add runtime deps to docker image
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM golang:1.9.2
+# First stage is used to install the binaries that we need
+FROM ubuntu
+RUN apt-get update && \
+ apt-get install --no-install-recommends --no-install-suggests -y \
+ curl \
+ ca-certificates \
+ git
+
+ENV KUBECTL_VERSION v1.9.3
+RUN curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \
+ chmod +x /usr/local/bin/kubectl
+
+ENV HELM_VERSION v2.8.1
+RUN curl -LO https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz && \
+ tar -zxvf helm-${HELM_VERSION}-linux-amd64.tar.gz && \
+ mv linux-amd64/helm /usr/local/bin/helm
+
+# Second stage is to build the skaffold binary from source
+FROM golang:1.10
WORKDIR /go/src/github.com/GoogleCloudPlatform/skaffold
COPY . .
RUN make
FROM ubuntu
WORKDIR /root/
-COPY --from=0 /go/src/github.com/GoogleCloudPlatform/skaffold/out/skaffold .
-CMD ["./skaffold", "version"]
+COPY --from=0 /usr/local/bin/kubectl /usr/local/bin/kubectl
+COPY --from=0 /usr/local/bin/helm /usr/local/bin/helm
+COPY --from=0 /usr/bin/git /usr/bin/git
+
+COPY --from=1 /go/src/github.com/GoogleCloudPlatform/skaffold/out/skaffold .
+
+CMD ["/root/skaffold", "version"]
