Skip to content

Instantly share code, notes, and snippets.

@kriscoleman
Last active November 2, 2019 18:15
Show Gist options
  • Save kriscoleman/e3257b73e3def64ccf77d4d1e2797bde to your computer and use it in GitHub Desktop.
Save kriscoleman/e3257b73e3def64ccf77d4d1e2797bde to your computer and use it in GitHub Desktop.
My Portable Docker IDE
#!/bin/sh
PROJECT_NAME=${PWD#"${PWD%/*/*}/"}
CONTAINER_NAME=${PROJECT_NAME//\//_}
docker run -it --rm \
-v $PWD:/workspace \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.ssh:/home/me/.ssh \
-v ~/.tmux/ressurect/${PROJECT_NAME}:/home/me/.tmux/resurrect \
-e HOST_PATH=$PWD \
-e HOST_USER_ID=$(id -u $USER) \
-e HOST_GROUP_ID=$(id -g $USER) \
-e PROJECT_NAME=$PROJECT_NAME \
-e GIT_USER_NAME="Kris Coleman" \
-e GIT_USER_EMAIL="me@email.com" \
--name $CONTAINER_NAME \
kriscoleman/ides:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment