Skip to content

Instantly share code, notes, and snippets.

@bkatiemills
Created September 19, 2017 14:16
Show Gist options
  • Save bkatiemills/370c3f653b9d9eda34a70e61e692f21c to your computer and use it in GitHub Desktop.
Save bkatiemills/370c3f653b9d9eda34a70e61e692f21c to your computer and use it in GitHub Desktop.
simple docker socket mount example
FROM ubuntu:16.04
# install docker
RUN apt-get update
RUN apt-get install -y apt-transport-https ca-certificates curl software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt-get update
RUN apt-get install -y docker-ce
# example usage:
# docker run -it -v /var/run/docker.sock:/var/run/docker.sock this_image bash
# run docker commands inside container to manupulate dockerd on host.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment