Skip to content

fix(docker): ensure index.html is world-readable in entrypoint#445

Merged
DennisOSRM merged 5 commits intogh-pagesfrom
fix/docker-entrypoint-index-perm
May 3, 2026
Merged

fix(docker): ensure index.html is world-readable in entrypoint#445
DennisOSRM merged 5 commits intogh-pagesfrom
fix/docker-entrypoint-index-perm

Conversation

@DennisOSRM
Copy link
Copy Markdown
Contributor

Ensure index.html is world-readable to avoid nginx 403 (permission denied).\n\nThis change sets chmod 644 on the temporary file before moving it into /usr/share/nginx/html in docker/entrypoint.sh.\n\nCo-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

chmod 644 tmp file before moving to /usr/share/nginx/html to avoid nginx 403 (permission denied) on index.html

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 3, 2026 18:07
@DennisOSRM DennisOSRM changed the title docker: ensure index.html is world-readable in entrypoint fix(docker): ensure index.html is world-readable in entrypoint May 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Docker container startup script to avoid nginx 403 (permission denied) by ensuring the runtime-modified index.html ends up world-readable after the entrypoint injects the osrm-environment meta tag.

Changes:

  • Add chmod 644 to the temporary index.html generated in docker/entrypoint.sh before moving it into /usr/share/nginx/html/index.html.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/entrypoint.sh Outdated
}
print
}' /usr/share/nginx/html/index.html > "$TMPFILE" && mv "$TMPFILE" /usr/share/nginx/html/index.html || true
}' /usr/share/nginx/html/index.html > "$TMPFILE" && chmod 644 "$TMPFILE" && mv "$TMPFILE" /usr/share/nginx/html/index.html || true
DennisOSRM and others added 4 commits May 3, 2026 20:12
Don't silently swallow awk/chmod/mv failures; emit warnings and remove temp file instead of ignoring errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…age serves a page (skipped by default)

Run with RUN_DOCKER_TESTS=1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove RUN_DOCKER_TESTS gating so the integration test runs by default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DennisOSRM DennisOSRM merged commit 7e5aef4 into gh-pages May 3, 2026
5 checks passed
@DennisOSRM DennisOSRM deleted the fix/docker-entrypoint-index-perm branch May 3, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants