Skip to content

Instantly share code, notes, and snippets.

@csantanapr
Last active July 23, 2020 22:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save csantanapr/54495bac805a1cdc100b0955e8e6bdcc to your computer and use it in GitHub Desktop.
Save csantanapr/54495bac805a1cdc100b0955e8e6bdcc to your computer and use it in GitHub Desktop.
dind on Kubernetes
apiVersion: v1
kind: Pod
metadata:
name: dind
labels:
app: dind
spec:
volumes:
- name: dind-storage
emptyDir: {}
- name: workspace
emptyDir: {}
containers:
- name: dind
image: csantanapr/docker:dind
imagePullPolicy: Always
securityContext:
privileged: true
volumeMounts:
- name: dind-storage
mountPath: /var/lib/docker
- name: workspace
mountPath: /root/workspace
FROM docker:dind
RUN set -eux; \
apk add --no-cache \
git \
iptables \
jq \
bash \
vim \
curl \
nano
ENV IBMCLOUD_CLI_VERSION 1.1.0
ADD https://clis.cloud.ibm.com/download/bluemix-cli/${IBMCLOUD_CLI_VERSION}/linux64/archive /ibmcloud.tgz
RUN set -eux; \
tar -xvf /ibmcloud.tgz -C /usr/local/bin/ --strip-components=1 && \
ibmcloud config --usage-stats-collect false && \
ibmcloud plugin repo-plugins -r 'IBM Cloud' && \
ibmcloud plugin install kubernetes-service && \
ibmcloud plugin install container-registry
WORKDIR /root/workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment