Thanks to visit codestin.com
Credit goes to github.com

Skip to content

not working docker file #12330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NeilRiver opened this issue May 6, 2025 · 0 comments
Open

not working docker file #12330

NeilRiver opened this issue May 6, 2025 · 0 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@NeilRiver
Copy link

Describe the Bug

I tried to build a website template and nothing worked

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/blob/main/templates/website/Dockerfile

Reproduction Steps

 DOCKER_BUILDKIT=1 sudo docker build -t myapp:latest .
[+] Building 19.6s (12/20)                                                                                                                       docker:default
 => [internal] load build definition from Dockerfile                                                                                                       0.0s
 => => transferring dockerfile: 2.54kB                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/node:22.12.0-alpine                                                                                     2.4s
 => [internal] load .dockerignore                                                                                                                          0.0s
 => => transferring context: 2B                                                                                                                            0.0s
 => [base 1/1] FROM docker.io/library/node:22.12.0-alpine@sha256:51eff88af6dff26f59316b6e356188ffa2c422bd3c3b76f2556a2e7e89d080bd                          0.0s
 => [internal] load build context                                                                                                                         14.5s
 => => transferring context: 227.34MB                                                                                                                     14.3s
 => CACHED [builder 1/4] WORKDIR /app                                                                                                                      0.0s
 => CACHED [runner 2/8] RUN addgroup --system --gid 1001 nodejs                                                                                            0.0s
 => CACHED [runner 3/8] RUN adduser --system --uid 1001 nextjs                                                                                             0.0s
 => CACHED [deps 1/4] RUN apk add --no-cache libc6-compat                                                                                                  0.0s
 => CACHED [deps 2/4] WORKDIR /app                                                                                                                         0.0s
 => CACHED [deps 3/4] COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./                                                                   0.0s
 => ERROR [deps 4/4] RUN   if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm ci;   elif [ -f pnpm-lock.yaml ];   1.9s
------                                                                                                                                                          
 > [deps 4/4] RUN   if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm ci;   elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile;   else echo "Lockfile not found." && exit 1;   fi:
1.812 /usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535
1.812   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);
1.812                                               ^
1.812 
1.812 Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCICN0DYf5CMgB9EG5d1WBA8kw83Ko1+aJItOTKA1xdSdlAiBOvmZjOKW3xzhfA4jyB/DgUSdbY68gzGtiyoVqfwwfAw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
1.812     at verifySignature (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
1.812     at fetchLatestStableVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21553:5)
1.812     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
1.812     at async fetchLatestStableVersion2 (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21672:14)
1.812     at async Engine.getDefaultVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22292:23)
1.812     at async Engine.executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22390:47)
1.812     at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23096:5)
1.812 
1.812 Node.js v22.12.0
------

 3 warnings found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 67)
 - JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 71)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 44)
Dockerfile:14
--------------------
  13 |     COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
  14 | >>> RUN \
  15 | >>>   if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
  16 | >>>   elif [ -f package-lock.json ]; then npm ci; \
  17 | >>>   elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
  18 | >>>   else echo "Lockfile not found." && exit 1; \
  19 | >>>   fi
  20 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm ci;   elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile;   else echo \"Lockfile not found.\" && exit 1;   fi" did not complete successfully: exit code: 1

Which area(s) are affected? (Select all that apply)

area: templates

Environment Info

Binaries:
  Node: 22.11.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 10.8.1
Relevant Packages:
  payload: 3.36.1
  next: 15.3.1
  @payloadcms/db-postgres: 3.36.1
  @payloadcms/email-nodemailer: 3.36.1
  @payloadcms/graphql: 3.36.1
  @payloadcms/live-preview: 3.36.1
  @payloadcms/live-preview-react: 3.36.1
  @payloadcms/next/utilities: 3.36.1
  @payloadcms/payload-cloud: 3.36.1
  @payloadcms/plugin-form-builder: 3.36.1
  @payloadcms/plugin-nested-docs: 3.36.1
  @payloadcms/plugin-redirects: 3.36.1
  @payloadcms/plugin-search: 3.36.1
  @payloadcms/plugin-seo: 3.36.1
  @payloadcms/richtext-lexical: 3.36.1
  @payloadcms/translations: 3.36.1
  @payloadcms/ui/shared: 3.36.1
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Fri Apr 25 15:43:38 UTC 2025
  Available memory (MB): 15449
  Available CPU cores: 12
@NeilRiver NeilRiver added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels May 6, 2025
@github-actions github-actions bot removed the validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant