forked from EvergreenCrypto/docker-finance
Merge pull request #97 into master
6b5c8afclient: docker.bash: fix help usage (dev-tools alias) (Aaron Fiore)e9bd7f3client: lib_docker: add USER/WORKDIR to finalize Dockerfile (Aaron Fiore)c49e0adclient: lib_gen: fix missing directory slash (Aaron Fiore)
This commit is contained in:
@@ -131,7 +131,7 @@ function main()
|
||||
$ alias dev-tools=\"$0 dev-tools${global_arg_delim_1}${USER}:latest\"
|
||||
|
||||
\e[37;2m# Generate environment and build default image\e[0m
|
||||
$ dev-tools gen && docker-finance_dev-tools build type${global_arg_delim_2}default
|
||||
$ dev-tools gen && dev-tools build type${global_arg_delim_2}default
|
||||
|
||||
\e[37;2m# Spawn a container with given command (removed after command finishes)\e[0m
|
||||
$ dev-tools run 'shellcheck --version'
|
||||
|
||||
@@ -290,6 +290,16 @@ function lib_docker::__build()
|
||||
"$global_custom_dockerfile" >>"$_final" || return $?
|
||||
fi
|
||||
|
||||
#
|
||||
# Finalize Dockerfile
|
||||
#
|
||||
|
||||
# Guarantees that any additions to custom Dockerfile (or a missing custom)
|
||||
# will not prevent bringing `up` a container into the correct environment.
|
||||
lib_utils::print_debug "Finalizing '${_final}'"
|
||||
echo -e "# WARNING: keep at end of file\nUSER ${DOCKER_FINANCE_USER}\nWORKDIR /home/${DOCKER_FINANCE_USER}\n" \
|
||||
>>"$_final"
|
||||
|
||||
#
|
||||
# Execute
|
||||
#
|
||||
|
||||
@@ -233,7 +233,7 @@ function lib_gen::__set_client_globals()
|
||||
lib_utils::print_debug "global_env_file=${global_env_file}"
|
||||
|
||||
# Custom Dockerfile (if available)
|
||||
local _client_dockerfile_dir="${DOCKER_FINANCE_CLIENT_CONF}${global_tag_dir}/Dockerfiles"
|
||||
local _client_dockerfile_dir="${DOCKER_FINANCE_CLIENT_CONF}/${global_tag_dir}/Dockerfiles"
|
||||
[ ! -d "$_client_dockerfile_dir" ] && mkdir -p "$_client_dockerfile_dir"
|
||||
global_custom_dockerfile="${_client_dockerfile_dir}/${global_conf_filename}"
|
||||
lib_utils::print_debug "global_custom_dockerfile=${global_custom_dockerfile}"
|
||||
|
||||
Reference in New Issue
Block a user