From 10c755fe0cb4167954ee45af6cd8c4d4764339f2 Mon Sep 17 00:00:00 2001 From: Edward Almanzar Date: Sun, 6 Oct 2024 08:19:47 -0400 Subject: [PATCH] Enhance Docs for Custom Apps: Base64 Decoding for Testing and Fix 'nginx-entrypoint.sh: No Such File' Issue on Windows only" (#1479) * Decode the Base64-encoded Environment Variable * add docs to fix nginx-entrypoint.sh: no such file on windows * Revert "add docs to fix nginx-entrypoint.sh: no such file on windows" This reverts commit 395d7cfa3f724073adb702d43195eb5452d89e06. * add docs to fix nginx-entrypoint.sh: no such file on windows * Fix files according to pre-commit hooks --- docs/custom-apps.md | 12 ++++++++++++ docs/error-nginx-entrypoint-windows.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 docs/error-nginx-entrypoint-windows.md diff --git a/docs/custom-apps.md b/docs/custom-apps.md index f33aa3c7..a3d4ef6c 100644 --- a/docs/custom-apps.md +++ b/docs/custom-apps.md @@ -34,6 +34,18 @@ You can also generate base64 string from json file: export APPS_JSON_BASE64=$(base64 -w 0 /path/to/apps.json) ``` +Test the Previous Step: Decode the Base64-encoded Environment Variable + +To verify the previous step, decode the APPS_JSON_BASE64 environment variable (which is Base64-encoded) into a JSON file. Follow the steps below: + +1. Use the following command to decode and save the output into a JSON file named apps-test-output.json: + +```shell +echo -n ${APPS_JSON_BASE64} | base64 -d > apps-test-output.json +``` + +2. Open the apps-test-output.json file to review the JSON output and ensure that the content is correct. + Note: - `url` needs to be http(s) git url with personal access tokens without username eg:- http://{{PAT}}@github.com/project/repository.git in case of private repo. diff --git a/docs/error-nginx-entrypoint-windows.md b/docs/error-nginx-entrypoint-windows.md new file mode 100644 index 00000000..7be1c2ca --- /dev/null +++ b/docs/error-nginx-entrypoint-windows.md @@ -0,0 +1,12 @@ +# Resolving Docker `nginx-entrypoint.sh` Script Not Found Error on Windows + +If you're encountering the error `exec /usr/local/bin/nginx-entrypoint.sh: no such file or directory` in a Docker container on Windows, follow these steps to resolve the issue. + +## 1. Check Line Endings + +On Windows, files often have `CRLF` line endings, while Linux systems expect `LF`. This can cause issues when executing shell scripts in Linux containers. + +- **Convert Line Endings using `dos2unix`:** + ```bash + dos2unix resources/nginx-entrypoint.sh + ```