Last active
October 17, 2018 19:20
-
-
Save pierew/3e3037142938028aeccbe2390a376397 to your computer and use it in GitHub Desktop.
Docker in Docker Isolation for cheap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ $(docker inspect -f {{.State.Running}} $USER 2>/dev/null) ]]; then | |
docker exec -it $USER /bin/sh | |
else | |
echo "Initializing your Docker Environment..." | |
docker run --name $USER --privileged -d docker:dind | |
sleep 1 | |
docker exec -it $USER /bin/sh | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo /usr/local/bin/dockerconnect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Defaults env_keep += "USER" | |
%users ALL=(ALL) NOPASSWD:ALL /usr/local/bin/dockerconnect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment