当我尝试使用 docker-compose 运行一些容器时,我遇到了问题。其中之一是 React 项目。问题是,当 docker 尝试构建 React 项目时,它构建得很好,没有任何问题,但是......它卡在构建过程的末尾,并且不继续 Dockerfile 的其他步骤。我对 Docker 还很陌生,所以我想我一定错过了一些东西,但对我来说似乎没问题。
我尝试过的:
在 React 项目的根目录(Dockerfile 所在的位置),我执行了“docker build”。它显示了这一点:
控制台输出:
Step 4/6 : RUN npm install --production
---> Running in 272b40588564
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the …Run Code Online (Sandbox Code Playgroud)