简体   繁体   English

来自 docker.io/library/build:latest containerizing svelte 的错误

[英]ERROR FROM docker.io/library/build:latest containerizing svelte

I am getting the follow issue, that I can't seem to google correctly.我遇到了以下问题,我似乎无法正确使用谷歌搜索。 I am trying to build sveltekit inside a container to run on my linux server.我正在尝试在容器内构建 sveltekit 以在我的 linux 服务器上运行。 I tried several different distros of alpine get the same issue.我尝试了几个不同的 alpine 发行版都遇到了同样的问题。 I get 200 when I try to curl https://docker.io/library/build:latest当我尝试 curl https://docker.io/library/build:latest时,我得到 200

 => ERROR FROM docker.io/library/build:latest                                                                            1.3s
 => => resolve docker.io/library/build:latest                                                                            1.3s
 => CANCELED [deploy-node 1/6] FROM docker.io/library/node:18-alpine3.15@sha256:bc11ceb232df9f6758dd2a05aeb65e103f8e8f9

------
 > FROM docker.io/library/build:latest:
------
failed to solve: failed to load cache key: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
version: "3.7"

services:
  app-node:
    image: svelte-docker-node
    build:
      context: .
      dockerfile: Dockerfile
      target: deploy-node
    ports:
      - 3000:3000

dockerfile dockerfile

FROM node:18-alpine3.15 AS deploy-node

WORKDIR /app
RUN rm -rf ./*
COPY --from=build /app/package.json .
COPY --from=build /app/build .
RUN yarn --Prod
CMD ["node", "index.js"]

This looks like it's been copied from a multi-stage build, and is missing the other stages.这看起来像是从多阶段构建中复制的,并且缺少其他阶段。

COPY --from=build /app/package.json .
COPY --from=build /app/build .

The --from option looks for another stage with that name, eg you've defined a deploy-node stage: --from选项查找具有该名称的另一个阶段,例如您已经定义了一个deploy-node阶段:

FROM node:18-alpine3.15 AS deploy-node

When it can't find the stage, it falls back to copying from an image with that name, and there's no build:latest image on Docker Hub, so the copy fails.当它找不到阶段时,它会回退到从具有该名称的图像中复制,并且在 Docker Hub 上没有build:latest图像,因此复制失败。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Docker:从 docker.io 拉取图像(最新)时出错 - Docker : Error pulling image (latest) from docker.io docker.io/library/python.alpine3.8:latest 的错误 [内部] 加载元数据 - ERROR [internal] load metadata for docker.io/library/python.alpine3.8:latest 在存储库docker.io/library/中找不到最新标签<package> - Tag latest not found in repository docker.io/library/<package> 错误无法将图像'library/web:latest'推送到注册表'docker.io'。 错误:被拒绝:请求的资源访问被拒绝 - Kompose up - ERROR Unable to push image 'library/web:latest' to registry 'docker.io'. Error: denied: requested access to the resource is denied - Kompose up 尝试 docker-compose up --build 时出现错误“[internal] load metadata for docker.io/library/python:3.10-alpine” - Getting ERROR "[internal] load metadata for docker.io/library/python:3.10-alpine" when trying to docker-compose up --build 在代理服务器后面的Redhat Enterprise Linux上的存储库docker.io/library/centos中找不到最新标签 - Tag latest not found in repository docker.io/library/centos on Redhat Enterprise Linux behind proxy server OpenShift构建配置-推送至docker.io - OpenShift build config - push to docker.io 在不涉及 docker.io 的情况下构建并使用 docker 图像 - Build and use a docker image without involving docker.io 码头工人:码头工人还是docker.io? - Docker: docker or docker.io? 使用不带内置NAT功能但带DHCP的Docker.io - Use Docker.io without the build-in NAT function but with DHCP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM