diff --git a/tools/docker/docker-entrypoint-ign.sh b/tools/docker/docker-entrypoint-ign.sh index d86b2c4940..346363396f 100755 --- a/tools/docker/docker-entrypoint-ign.sh +++ b/tools/docker/docker-entrypoint-ign.sh @@ -8,7 +8,8 @@ CONFIG_FILE_NAME=default.toml if [ ! -z "${GN4_API_URL}" ] then echo "[INFO] Replacing GN4 url in conf with: ${GN4_API_URL}..." - sed -i "s%geonetwork4_api_url = \".*\"%geonetwork4_api_url = \"${GN4_API_URL}\"%" ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME} + sed "s%geonetwork4_api_url = \".*\"%geonetwork4_api_url = \"${GN4_API_URL}\"%" ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME} > /tmp/${CONFIG_FILE_NAME} && cat /tmp/${CONFIG_FILE_NAME} > ${APP_FILES_PATH}${CONFIG_FILE_PATH}${CONFIG_FILE_NAME} + rm /tmp/${CONFIG_FILE_NAME} fi echo "[INFO] docker-entrypoint-ign.sh ended successfully."