Skip to content
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

Dockerfile not functional #10153

Closed
AlphaMoonbaseBerlin opened this issue Dec 23, 2024 · 3 comments · Fixed by #10184
Closed

Dockerfile not functional #10153

AlphaMoonbaseBerlin opened this issue Dec 23, 2024 · 3 comments · Fixed by #10184

Comments

@AlphaMoonbaseBerlin
Copy link

Describe the Bug

The provided dockerfile as is right now is not functional. Trying to run original Dockerfile to build an image fails initialy because the provided baseimage node18-alpine is to old and next requires at least node20.
Even after bumbping the version of the baseimage, the process fails with "Conflicting peer dependency".
The project runs totaly fine when started localy using npm run dev.

I tried the following things:

  • Updating the baseimage to node
  • Running npm install in the projectfolder to update packagelock.json
  • Removing the package-lock.json and running npm install
  • Removing node-modules and package-lock.json and running npm install

Link to the code that reproduces this issue

https://github.com/AlphaMoonbaseBerlin/Payload_TD_Killswitch

Reproduction Steps

Either:
create new payload app using npx create-payload-app
or
download provided repository && npm install

run
docker build -t 'foobar'

Will result n

 => ERROR [deps 4/4] RUN   if [ -f yarn.lock ]; then yarn --frozen-lockfile;   elif [ -f package-lock.json ]; then npm c  3.2s 
------
 > [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:   
#12 2.485 npm warn ERESOLVE overriding peer dependency
#12 2.486 npm warn While resolving: @monaco-editor/[email protected]
#12 2.486 npm warn Found: [email protected]
#12 2.486 npm warn node_modules/react
#12 2.486 npm warn   react@"19.0.0" from the root project
#12 2.486 npm warn   27 more (@dnd-kit/accessibility, @dnd-kit/core, ...)
#12 2.486 npm warn
#12 2.486 npm warn Could not resolve dependency:
#12 2.486 npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @monaco-editor/[email protected]
#12 2.486 npm warn node_modules/@monaco-editor/react
#12 2.486 npm warn   @monaco-editor/react@"4.6.0" from @payloadcms/[email protected]
#12 2.486 npm warn   node_modules/@payloadcms/ui
#12 2.486 npm warn   1 more (payload)
[...]
#12 2.994 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are 
in sync. Please update your lock file with `npm install` before continuing.
#12 2.994 npm error
#12 2.994 npm error Missing: [email protected] from lock file
#12 2.994 npm error Missing: [email protected] from lock file
#12 2.994 npm error Invalid: lock file's [email protected] does not satisfy [email protected]
[...]
executor failed running [/bin/sh -c if [ -f yarn.lock ];  [...]

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

Not sure

Environment Info

"@payloadcms/next": "3.9.0"
Windows 10
Node v20.14.0.
Docker version 20.10.21, build baeda1f
@AlphaMoonbaseBerlin
Copy link
Author

AlphaMoonbaseBerlin commented Dec 26, 2024

@r1tsuu
Has this been tested?
There where also some issues in using the alpine base image resulting in errors with the libsql package.
Only solution was to use the non-alpine node-image as the base.

https://discord.com/channels/967097582721572934/1317567429705994240

Copy link
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2024
@github-actions github-actions bot unlocked this conversation Dec 28, 2024
Copy link
Contributor

🚀 This is included in version v3.12.0

@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant