Skip to content

Instantly share code, notes, and snippets.

@summerwind
Created June 15, 2017 00:47
Show Gist options
  • Save summerwind/ec2788d22f03cbf70e5f821996b65228 to your computer and use it in GitHub Desktop.
Save summerwind/ec2788d22f03cbf70e5f821996b65228 to your computer and use it in GitHub Desktop.
python command wrapper for Container Linux
#!/bin/sh
if [ "${CONTAINER}" = "1" ]; then
/usr/local/bin/python $@
else
docker run \
-it --rm \
-v /:/host \
-v /opt:/opt \
-v /home:/home \
-e CONTAINER=1 \
python:2.7.13-alpine python $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment