Skip to content
\n

and I get this error:

\n
Error: buildx failed with: ERROR: failed to solve: failed to resolve source metadata for docker.io/library/nb-gh:aa2d155f8c3ef332a798d428d1404a0f28ea2d10: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed\n
\n

I tried adding cache-from/to: type=gha, no success.

\n

Similar to #670, but with more than just FROM

\n
\nDockerfile\n
FROM node:16-alpine as builder\n\nWORKDIR /usr/src/app\n\n## OS required dependencies\nRUN apk upgrade --no-cache && apk --no-cache --update --virtual build-dependencies add \\\n    python3 make g++ unbound-dev gmp-dev openssh-client git gcompat\n\n## Global dependencies\nRUN npm i -g sequelize\n\n## Install dependencies\nCOPY . .\nRUN npm ci\n\n## Base env config\nCOPY .env.config /usr/src/app/.env\n\n## Build\nRUN NODE_ENV=production npm run build\n\n## Remove some uncessary files\nRUN rm -rf lib/migrations/**/*.map && rm -rf lib/seeders/**/*.map\n\nFROM node:16-alpine as runtime \n\nWORKDIR /usr/src/app\n\nUSER node\n\n## Copy files from builder\nCOPY --from=builder --chown=node:node /usr/src/app/node_modules /usr/src/app/node_modules\nCOPY --from=builder --chown=node:node /usr/src/app/lib /usr/src/app/lib\nCOPY --from=builder --chown=node:node /usr/src/app/dist /usr/src/app/dist\nCOPY --from=builder --chown=node:node /usr/src/app/public /usr/src/app/public\n\nCMD [\"/sbin/tini\", \"node\", \"./lib/server/index.js\"]\n\n## Extra targets\n\nFROM runtime as lint\nRUN npx flow\n\nFROM runtime as test\n\nENV NODE_ENV=test\nENV NODE_CONFIG_DIR=./lib/config\n\nRUN npx mocha --recursive -r @babel/register -r dotenv/config --exit --colors --diff --timeout 15000 --full-trace true --retries 3
\n
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

https://docs.docker.com/build/ci/github-actions/share-image-jobs/

","upvoteCount":1,"url":"https://github.com/docker/build-push-action/discussions/1123#discussioncomment-9447287"}}}
Discussion options

You must be logged in to vote

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Falci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants