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

Docker standalone is missing sharp #65679

Open
1 task done
Tobi-mmt opened this issue May 13, 2024 · 1 comment
Open
1 task done

Docker standalone is missing sharp #65679

Tobi-mmt opened this issue May 13, 2024 · 1 comment
Labels
examples Issue/PR related to examples

Comments

@Tobi-mmt
Copy link

Tobi-mmt commented May 13, 2024

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112
Binaries:
  Node: 20.10.0
  npm: 10.6.0
  Yarn: 1.22.19
  pnpm: 9.0.6
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.0.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: standalone

Which example does this report relate to?

with-docker

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

When I deploye the folloeing example https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile the logs output the following error: Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production

Expected Behavior

The image optimization with the given example works well outside of an vercel hostign system.

To Reproduce

Just build an image with the given example and let it run on a system where sharp is not installed, so deploy it somwhere else than vercel.

@Tobi-mmt Tobi-mmt added the examples Issue/PR related to examples label May 13, 2024
@Tobi-mmt
Copy link
Author

A quick research allows me to say that there are a bunch of people which are struggling with the sharp intergration in a docker file. See

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue/PR related to examples
Projects
None yet
Development

No branches or pull requests

1 participant