docker - 错误:对于未经授权的nodejs:未授权访问所请求的资源
问题描述
我想将 sylius 与 docker 一起使用
我按照官网相同的步骤进行操作;
当我输入命令“docker-compose pull --ignore-pull-failures || true”时,出现以下错误:
Pulling mysql ... done
Pulling php ... error
Pulling nodejs ... error
Pulling nginx ... error
Pulling mailhog ... done
ERROR: for nginx unauthorized: access to the requested resource is not authorized
ERROR: for nodejs unauthorized: access to the requested resource is not authorized
ERROR: for php unauthorized: access to the requested resource is not authorized
ERROR: unauthorized: access to the requested resource is not authorized
unauthorized: access to the requested resource is not authorized
unauthorized: access to the requested resource is not authorized
帮我高级副总裁
解决方案
我通过从 dockercompose.yml 中删除缓存和图像来让它工作:
nginx:
build:
context: .
target: sylius_nginx
cache_from:
- quay.io/sylius/php:latest
- quay.io/sylius/nodejs:latest
- quay.io/sylius/nginx:latest
image: quay.io/sylius/nginx:latest
depends_on:
- php
- nodejs # to ensure correct build order
像这样删除 cache_from 和 image:
nginx:
build:
context: .
target: sylius_nginx
depends_on:
- php
- nodejs
对 php: 和 nodejs 执行相同的操作。
推荐阅读
- c++ - MQTT C++ 客户端
- c++ - 是否可以直接将依赖于实例的成员函数(方法)从另一个成员函数传递给 STL 的算法?
- php - 通过 PHP 创建一个 WC_Product_Subscription_Variation 并设置所需的帖子元(周期和周期间隔)
- sql - sql初学者是否有命令,所以我不能将空值传递到表中?
- python - python 3.7.3 - concurent.futures 等待麻烦
- javascript - 收到4xx状态码响应时如何阻止axios抛出的错误?
- python - 每组最低条件
- java - 使用 java 或 python 在 excel 数值数据上实现掩蔽算法(例如:噪声添加)
- python - varibale "count" won't be incremented even though if statement ,to increment it, matches the condition
- excel - VBA复制范围到所有工作表都优于复制的一个