Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

failed to load cache key: pull access denied powershell

Tags:

npm

docker

When running docker file this line failed RUN apt-get update && apt-get install -y wget && apt-get install -y gnupg2 && wget -qO- https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y build-essential nodejs

failed to solve with frontend dockerfile.v0: failed to build LLB: failed to load cache key: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

like image 239
Mac Milan Avatar asked Dec 16 '20 09:12

Mac Milan


1 Answers

I just had the issue, and in my case, the problem was with multistage build: I forgot to include as <stage_name> in my first stage in Dockerfile.

So as the first line I had

FROM maven:3.6.3-jdk-11-slim@latest

But I should have

FROM maven:3.6.3-jdk-11-slim@latest as build

instead, since I was referencing build in the next stage.

like image 75
Artem Malchenko Avatar answered Nov 15 '22 03:11

Artem Malchenko