Created
October 17, 2018 02:52
-
-
Save erikdstock/783565c7903372ac6ae7bad2e9b1d258 to your computer and use it in GitHub Desktop.
Docker shell commands
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
#!/usr/bin/env bash | |
# Start your built mycoolservice image with a bind mount on its source files in your ./myservice folder | |
DIR=$(dirname "$0") # relative | |
ROOT="$( cd "$DIR/.." && pwd )" # root, absolutized and normalized | |
Start the backend (docker) | |
cmd="docker run -p 8000:8000"\ | |
" --mount src=$ROOT/myservice,target=/code,type=bind"\ | |
" mycoolservice" | |
echo $cmd | |
eval $cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment