Closed djneely closed 7 months ago
Nothing to do with the documentation rather I would suggest making sure you installed sharp and gyp and build tools for your machine etc that does the building. This depends on your OS and should be documented here https://github.com/nodejs/node-gyp once that is installed docker will use that to setup dockers build environment as well.
Using the same machine to build, this seems to work fine using node:18-bullseye
which is what we've wound up going with for now instead of node:18-alpine
?
So the reason that bullseye
might work is that is the full version of debian and not alpine.
With alpine you get a small footprint but also you need to add all dependencies etc as needed.
I took the Dockerfile
you had in this issue and copied into mine and it built fine.
Did you add a .dockerignore
file to prevent copying things over from the host machine which can cause the issue.
https://docs.strapi.io/dev-docs/installation/docker#optional-dockerignore
I want to thank you a bunch. I didn't even realize the .dockerignore was not there anymore (I need to have a talk with one of the devs). Thank you again and apologies for the bother.
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/installation/docker
Describe the bug
I've copied and pasted the following Dockerfile to build for production but receiving errors when bulding
The issue seems to arise with the
RUN yarn config set network-timeout 600000 -g && yarn install --production
where I'm getting the following errors:Additional context
No response
Suggested improvements or fixes
I'm trying to work through the errors being reported around the
gyp
orsharp
module so that I can make it past the build phase.Related issue(s)/PR(s)
No response