client: src: lib_docker: filter docker related .in files

Creates a clutter-free finalized Dockerfile and docker-compose.yml by
removing all comments and blank lines.
This commit is contained in:
2024-09-24 16:27:54 -07:00
parent 8a1f653127
commit ae2c08d5df

View File

@@ -74,6 +74,7 @@ function lib_docker::__docker()
-e "s|@DOCKER_FINANCE_IMAGE@|${global_image}:${global_tag}|g" \
-e "s|@DOCKER_FINANCE_CONTAINER@|${global_container}|g" \
-e "s|@DOCKER_FINANCE_NETWORK@|${global_network}|g" \
-e "/^ *#/d" -e "/^$/d" \
"${_path}.${global_platform}.in" >"$_path" || return $?
}
@@ -318,6 +319,9 @@ function lib_docker::__build()
echo -e "# WARNING: keep at end of file\nUSER ${DOCKER_FINANCE_USER}\nWORKDIR /home/${DOCKER_FINANCE_USER}\n" \
>>"$_final"
# Remove all comments and empty lines
sed -i -e "/^ *#/d" -e "/^$/d" "$_final"
#
# Execute
#