Closed NewSNode closed 1 month ago
The error you're encountering with the sharp
module during your Docker build is likely due to it failing to download the libvips
library from GitHub's servers. This can happen because of network connectivity issues or a proxy blocking access to GitHub.
To work around this, you can specify an alternative URL for downloading libvips
by setting the SHARP_DIST_BASE_URL
environment variable in your Dockerfile. Here's an example of how to do it:
ENV SHARP_DIST_BASE_URL="https://your-alternative-url.com/"
Replace "https://your-alternative-url.com/"
with the URL of your alternative source for libvips
.
Additionally, since you're using an Alpine Linux base image, you might need to install the vips-dev
package to resolve any issues related to compiling the native dependencies required by sharp
. Add this line to your Dockerfile before installing Node.js dependencies:
RUN apk add --update --no-cache vips-dev
This ensures the necessary libraries for sharp
are available, potentially resolving the installation issues. For more detailed information on system dependencies for sharp
, refer to the sharp installation guide.
If you continue to face issues or have any more questions, feel free to ask.
To continue the conversation, mention @dosu.
I have added some info to Dockerfile of the frontend program, and i exce success.
the info as:
RUN apk add --update --no-cache vips-dev fftw-dev build-base
Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.
What happened?
when i exec docker compose up,same error comes, as log info.
what happened?
Relevant log output
Twitter / LinkedIn details
No response