/ docker

Azure CLI Dockerfile with kubectl

Level - Intermediate. Read Time ~ <2 minutes.

To try and keep up with the times, I've recently been dabbling with Kubernetes as part of a hack day. Great technology and it is gathering real traction in the Docker/container world.

As part of CI I wanted to use a Docker image which had the Azure CLI and kubectl baked in. I found the official Microsoft one, but it didn't have kubectl. So I rolled my own (pretty basic as you can see). Dockerfile below and link to it on Docker Hub.

FROM microsoft/azure-cli:latest

LABEL maintainer="<[email protected]>"

RUN wd=`pwd` && \
    wget https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && \
    export PATH=$PATH:$wd && \
    chmod +x ./kubectl

Docker Hub