Skip to content

Instantly share code, notes, and snippets.

@ihucos
Created September 22, 2018 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihucos/81bdd87bf9833e3ab13b6fec2b1c8766 to your computer and use it in GitHub Desktop.
Save ihucos/81bdd87bf9833e3ab13b6fec2b1c8766 to your computer and use it in GitHub Desktop.
Run the Docker client inside plash
#!/usr/bin/env plash-exec
--# usage: plash-docker <DOCKER-ARGS>
--# Run the docker client inside alpine linux. Use the PLASH_DOCKER_SOCKET
--# environment variable to select the docker socket, the default is
--# '/tmp/docker.sock'. Note that '/var/run/docker.sock' is not shared between
--# containers and host and may not be appropriate as a socket.
--from
alpine
--apk
docker
--layer
--entrypoint-script
#!/bin/sh
export DOCKER_HOST=unix://${PLASH_DOCKER_SOCKET:-/tmp/plash-docker-wrap/docker.sock}
exec docker "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment