Next.js Discord

Discord Forum

Github Action Docker Image build failing

Unanswered
American Wirehair posted this in #help-forum
Open in Discord
Avatar
American WirehairOP
Hey guys, I am trying to publish my Next.js app to a Docker registry with a github action, but I'll get this error:
ERROR: failed to solve: process "/bin/sh -c if [ -f yarn.lock ]; then yarn run build;   elif [ -f package-lock.json ]; then npm run build;   elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build;   else echo \"Lockfile not found.\" && exit 1;   fi" did not complete successfully: exit code: 1
    at makeError (/home/runner/work/website/website/node_modules/@codedependant/semantic-release-docker/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/home/runner/work/website/website/node_modules/@codedependant/semantic-release-docker/node_modules/execa/index.js:114:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Image.build (/home/runner/work/website/website/node_modules/@codedependant/semantic-release-docker/lib/docker/image.js:268:30)
    at async dockerPrepare (/home/runner/work/website/website/node_modules/@codedependant/semantic-release-docker/lib/prepare.js:12:3)
    at async validator (file:///home/runner/work/website/website/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///home/runner/work/website/website/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
    at async file:///home/runner/work/website/website/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
    at async pluginsConfigAccumulator.<computed> [as prepare] (file:///home/runner/work/website/website/node_modules/semantic-release/lib/plugins/index.js:87:11)
    at async run (file:///home/runner/work/website/website/node_modules/semantic-release/index.js:202:3)


what could be the problem there? thats my Dockerfile:
https://just-paste.it/zOpijjKdRD (message would be to long)

there isn't any helpful error message :/ please some help

3 Replies

Avatar
Schneider’s Smooth-fronted Caiman
maybe you use pnpm but did not install it on the container
you can put this line 2 to your Dockerfile so it's installed everywhere
RUN npm install -g pnpm
or yarn
Avatar
American WirehairOP
fixed that by myself, sentry cli gave some errors locally