Last active
August 4, 2019 23:45
-
-
Save sam0x17/52aedc02dfb56b35a82c925cc6e7311e to your computer and use it in GitHub Desktop.
local docker environment setup
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
# set up docker volume and image (host ~ will be bound to /host) | |
docker volume create devenv | |
mkdir -p ~/.alpine-dev | |
docker run -v ~:/host -it --mount source=devenv,target=/Users/sam/.alpine-dev --name alpine-dev alpine | |
# setup within container: | |
apk add bash | |
ln -fs /bin/bash /bin/sh | |
adduser sam | |
apk add sudo | |
# nano /etc/sudo[TAB] and add a line for user sam | |
# terminal start command: | |
docker start alpine-dev && docker exec -it alpine-dev sudo -u sam bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment