本文聚焦 Docker 启动时 "entrypoint.sh" 存在却执行失败的问题,梳理 CRLF、权限、shebang、挂载覆盖、架构不匹配与 EOL 镜像仓库异常等根因,提供诊断命令与修复路径,并给出兼顾稳定性与可维护性的 Dockerfile、CI 与镜像升级建议。
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.
自动化发布 npm 包是现代前端和 Node.js 开发的标配。本文将介绍两种常用的发布流程,这两套 Workflow 都可直接复用,适合绝大多数 npm 包项目的自动化集成。