[英]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.