diff --git a/start_docker.sh b/start_docker.sh index 384228d..b251685 100755 --- a/start_docker.sh +++ b/start_docker.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +mount_prefix="$HOME/.spark-dev/mounts" + function print_help_and_exit() { cat < in the image (defaults to <--user>) - -i,--image The image to instantiate - -c,--container The name for the container - -m,--mount The name for the folder (on the host) that is mounted to container's 'home' dir - --port : or [:,...] Port mapping(s). May be specified multiple times. - -h,--help Print this help message and exit + -u,--user USER The user to add in the container (defaults to the current user) + -p,--pass PASS The password for USER in the container (defaults to USER) + -i,--image IMAGE The image to instantiate + -c,--container CONT The name for the container + -m,--mount MOUNT The name for the folder (outside the container) to create/mount to the home + directory in the container. Mount folders are added here: $mount_prefix + --port : OR [:,...] Port mapping(s). May be + specified multiple times. + -h,--help Print this help message and exit EOF exit "$1" @@ -143,7 +147,7 @@ if [[ -z "$docker_user" ]]; then docker_user="$USER" fi -home_src=$HOME/.spark-dev/mounts/$mount_name +home_src=$mount_prefix/$mount_name home_tgt=$HOME repo_src=$(git rev-parse --show-superproject-working-tree) repo_tgt=$HOME/$(basename "$repo_src")