We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using the provided example in the documentation to build dockerized production images, the image will fail to start with the following error.
2024-04-29 19:28:50 yarn run v1.22.19 2024-04-29 19:28:50 $ strapi start 2024-04-29 19:28:51 [2024-04-29 17:28:51.522] debug: ⛔️ Server wasn't able to start properly. 2024-04-29 19:28:51 [2024-04-29 17:28:51.523] error: Could not load js config file /opt/node_modules/@strapi/plugin-upload/strapi-server.js: 2024-04-29 19:28:51 Something went wrong installing the "sharp" module 2024-04-29 19:28:51 2024-04-29 19:28:51 Cannot find module '../build/Release/sharp-linuxmusl-arm64v8.node'
here bellow my Dockerfile.prod
# Creating multi-stage build for production FROM node:20-alpine as build RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1 ENV NODE_ENV=production WORKDIR /opt/ COPY package.json yarn.lock ./ RUN yarn global add node-gyp RUN yarn config set network-timeout 600000 -g && yarn install --production --ignore-scripts ENV PATH /opt/node_modules/.bin:$PATH WORKDIR /opt/app COPY . . RUN yarn build # Creating final production image FROM node:20-alpine RUN apk add --no-cache vips-dev ENV NODE_ENV=production WORKDIR /opt/ COPY --from=build /opt/node_modules ./node_modules WORKDIR /opt/app COPY --from=build /opt/app ./ ENV PATH /opt/node_modules/.bin:$PATH RUN chown -R node:node /opt/app USER node EXPOSE 1337 CMD ["yarn", "start"]
To reproduce the error on a macOS M1, I build the image locally, which will result in the same error upon startup.
The text was updated successfully, but these errors were encountered:
This is a templated message
Hello @lgt,
I see you are wanting to ask a question that is not really a bug report,
Please see the following contributing guidelines for asking a question here.
Thank you.
Sorry, something went wrong.
No branches or pull requests
Bug report
Required System information
Describe the bug
Using the provided example in the documentation to build dockerized production images, the image will fail to start with the following error.
here bellow my Dockerfile.prod
Steps to reproduce the behavior
To reproduce the error on a macOS M1, I build the image locally, which will result in the same error upon startup.
The text was updated successfully, but these errors were encountered: