2

我想要达到的目标

按照 Saleor docker 安装说明进行操作。

https://saleor.readthedocs.io/en/latest/customization/docker.html#

重现问题的步骤

docker-compose build
docker-compose run web python3 manage.py migrate
docker-compose run web python3 manage.py collectstatic
docker-compose run web python3 manage.py populatedb --createsuperuser
docker-compose up
Goto http://127.0.0.1:8000

我期望发生的事情

我希望看到 Saleor 主页

我实际发生的事情

Error reading ./webpack-bundle.json. Are you sure webpack has generated the file and the path is correct?

系统信息

Operating system: MacOS High Sierra 10.13.3
Browser: Chrome 67.0.3396.99 (Official Build) (64-bit)
Docker Engine: 18.06.0-ce
Docker Compose: 1.22.0
Docker Machine: 0.15.0

运行yarn run build-assets不能解决问题,因为 docker 容器上没有安装 yarn。

似乎/app/webpack-bundle.json没有build-nodejs (node:8.6.0)按照Dockerfile.

COPY --from=build-nodejs /app/webpack-bundle.json /app/

npm run build-assets --production 运行 webpack -p --progress 应该已经创建/app/webpack-bundle.json

docker-compose up 的输出日志

Step 25/35 : COPY --from=build-nodejs /app/webpack-bundle.json /app/ ---> 68c7bcd63e49

并且 docker history 显示/app/webpack-bundle.json被复制到容器中。

68c7bcd63e49 20 minutes ago /bin/sh -c #(nop) COPY file:8bbd3e3203b94232… 1.18kB

https://github.com/mirumee/saleor/issues/2506

4

0 回答 0