Skip to content

Instantly share code, notes, and snippets.

@mjarkk
Created May 1, 2019 12:42
Show Gist options
  • Save mjarkk/8e511c9b33895eb74c5b46d8110d2038 to your computer and use it in GitHub Desktop.
Save mjarkk/8e511c9b33895eb74c5b46d8110d2038 to your computer and use it in GitHub Desktop.
A minimal example of a container with only the docker binary, handy for communicating with docker sock from the host
# Make sure to bind the docker sock as volume when running this in a container
FROM alpine
WORKDIR /usr/bin
RUN apk add docker && \
rm docker-init docker-proxy dockerd containerd containerd-shim containerd-shim-runc-v1 containerd-stress runc ctr
CMD ["docker", "ps"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment