From 8eb503953103e53afe4c162638b280bc76e7634b Mon Sep 17 00:00:00 2001 From: Lee Campbell Date: Sun, 1 Mar 2026 16:55:44 +0800 Subject: [PATCH 1/2] Fix CRLF line endings breaking devcontainer entrypoint on Linux Add .gitattributes to enforce LF endings for shell scripts, preventing the "no such file or directory" error when Docker runs entrypoint.sh on Linux after a Windows checkout converts line endings to CRLF. Co-Authored-By: Claude Opus 4.6 --- .devcontainer/run.sh | 3 +++ .gitattributes | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 .gitattributes diff --git a/.devcontainer/run.sh b/.devcontainer/run.sh index a812331..aa2350a 100644 --- a/.devcontainer/run.sh +++ b/.devcontainer/run.sh @@ -10,9 +10,12 @@ fi # Build docker build -t hdrhistogram-agent -f "$SCRIPT_DIR/Dockerfile" "$SCRIPT_DIR/" +echo "Built Docker image: hdrhistogram-agent" +echo "Starting container with .env file and mounted nuget cache volume. Named 'hdrhistogram-agent-0'" # Run docker run --rm \ + --name hdrhistogram-agent-0 \ --cap-add NET_ADMIN \ --cap-add NET_RAW \ --memory=4g \ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3921f32 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +# Auto-detect text files and normalise to LF in the repo +* text=auto eol=lf + +# Ensure shell scripts always use LF, even on Windows checkout +*.sh text eol=lf + +# Keep Windows batch files with CRLF +*.cmd text eol=crlf +*.bat text eol=crlf From 7aad1d96d3bc1843b63a77ad63544441d85eedfa Mon Sep 17 00:00:00 2001 From: Lee Campbell Date: Sun, 1 Mar 2026 17:04:14 +0800 Subject: [PATCH 2/2] Add .env to .gitignore to prevent committing secrets Co-Authored-By: Claude Opus 4.6 --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4b0a1ed..8bcde7a 100644 --- a/.gitignore +++ b/.gitignore @@ -117,4 +117,6 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML -Thumbs.db \ No newline at end of file +Thumbs.db + +.env \ No newline at end of file