Open post Docker

[EN] Troubleshooting "exec /PATH/entrypoint.sh" Docker Errors — Causes, Diagnostics, and Fixes

This guide analyzes common Docker startup failures like "no such file or directory" or "permission denied" involving "entrypoint.sh". Key causes include CRLF line endings, missing execution bits, incorrect shebangs, and architecture mismatches. It provides diagnostic steps (e.g., "sed -n l") and fixes such as using ".gitattributes" for LF normalization, applying "sed -i 's/\r$//'" in Dockerfiles to avoid extra packages, and handling archived Debian repositories (e.g., "node:10-buster") for legacy builds.

macOS 使用 Nginx 在本地部署静态网站

通过 Brew 安装 Nginx 并启动,配置默认静态页面和日志目录。新增静态页面服务,使用 try_files 语法实现 SPA 页面路由。try_files 尝试多个路径,若文件不存在则进行内部重定向。安装后默认端口为 8080,无需 sudo 运行。重启 Nginx 可使用 brew services restart nginx 或直接运行命令。参考文档提供了详细的 try_files 配置说明和版权信息。