client: lib_docker: add edit option for custom Dockerfile
This commit is contained in:
@@ -55,7 +55,7 @@ function main()
|
|||||||
Environment (all platforms):
|
Environment (all platforms):
|
||||||
|
|
||||||
gen \e[34;3mGenerate docker-finance environment\e[0m
|
gen \e[34;3mGenerate docker-finance environment\e[0m
|
||||||
edit \e[34;3mEdit existing client-side configuration file [arg]\e[0m
|
edit \e[34;3mEdit existing client-side configurations\e[0m
|
||||||
|
|
||||||
All platforms:
|
All platforms:
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ function lib_docker::__edit()
|
|||||||
|
|
||||||
Configuration type:
|
Configuration type:
|
||||||
|
|
||||||
type${global_arg_delim_2}<env|{shell|superscript}>
|
type${global_arg_delim_2}<env|{shell|superscript}|{build|dockerfile}>
|
||||||
|
|
||||||
\e[32mExamples:\e[0m
|
\e[32mExamples:\e[0m
|
||||||
|
|
||||||
@@ -243,8 +243,11 @@ function lib_docker::__edit()
|
|||||||
\e[37;2m# Edit client/container shell (superscript) \e[0m
|
\e[37;2m# Edit client/container shell (superscript) \e[0m
|
||||||
$ $global_usage type${global_arg_delim_2}shell
|
$ $global_usage type${global_arg_delim_2}shell
|
||||||
|
|
||||||
\e[37;2m# Edit client/container shell (w/ alternate wording) and environment variables\e[0m
|
\e[37;2m# Edit client's custom Dockerfile (appended to final Dockerfile) \e[0m
|
||||||
$ $global_usage type${global_arg_delim_2}superscript${global_arg_delim_3}env
|
$ $global_usage type${global_arg_delim_2}build
|
||||||
|
|
||||||
|
\e[37;2m# Previous commands with alternate wordings\e[0m
|
||||||
|
$ $global_usage type${global_arg_delim_2}superscript${global_arg_delim_3}dockerfile${global_arg_delim_3}env
|
||||||
"
|
"
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
@@ -277,7 +280,7 @@ function lib_docker::__edit()
|
|||||||
read -ra _read <<<"$_arg_type"
|
read -ra _read <<<"$_arg_type"
|
||||||
|
|
||||||
for _type in "${_read[@]}"; do
|
for _type in "${_read[@]}"; do
|
||||||
if [[ ! "$_type" =~ ^env$|^shell$|^superscript$ ]]; then
|
if [[ ! "$_type" =~ ^env$|^shell$|^superscript$|^build$|^dockerfile$ ]]; then
|
||||||
lib_utils::die_usage "$_usage"
|
lib_utils::die_usage "$_usage"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -312,6 +315,11 @@ function lib_docker::__edit()
|
|||||||
|
|
||||||
_paths+=("$global_shell_file")
|
_paths+=("$global_shell_file")
|
||||||
;;
|
;;
|
||||||
|
build | dockerfile)
|
||||||
|
[ -z "$global_custom_dockerfile" ] && lib_utils::die_fatal
|
||||||
|
|
||||||
|
_paths+=("$global_custom_dockerfile")
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user