You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
running webpack the first time can take a lot of time - on aws the build process inside the codepipeline took mostly ~2-4min. this would also the reason why your ssd is ~100% all the time... so maybe just wait for a longer time..? how long did you wait?
FROM strapi/base
WORKDIR /srv/app
COPY ./package.json ./
COPY ./yarn.lock ./
RUN yarn install
COPY . .
ENV NODE_ENV production
RUN yarn build
EXPOSE 1337
CMD ["yarn", "start"]
Now i'm trying to build the Docker Image, but it stucks always when building the webpack.
When I manually start yarn build in the container, then i can see that it's stuck at 90% processing chunk assets.
My container has 4GB Ram and 2 cpus attached. I can see that its using 100% SSD Read the whole time.
Do you have any suggestions?
I had this issue running Docker on a M1 chip. Later I added platform to the Dockerfile and also if it took more than 560 seconds it worked. I also used strapi/base instead of strapi/base:14-alpine
This fix worked for me:
FROM --platform=linux/amd64 strapi/base as base
WORKDIR /usr/src/app
#COPY ["package.json", "yarn.lock", "./"]
EXPOSE 1337
FROM base as builder
COPY ["package.json", "yarn.lock", "./"]
RUN yarn install
COPY . /usr/src/app
RUN yarn build
FROM base as release
ENV NODE_ENV=production
USER node
COPY --chown=node:node --from=builder /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=builder /usr/src/app/build ./build
COPY --chown=node:node . /usr/src/app
CMD ["yarn", "start"]
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I created a project using
npx create-strapi-app my-project --quickstart
created a Dockerfile:
Now i'm trying to build the Docker Image, but it stucks always when building the webpack.
When I manually start yarn build in the container, then i can see that it's stuck at 90% processing chunk assets.
My container has 4GB Ram and 2 cpus attached. I can see that its using 100% SSD Read the whole time.
Do you have any suggestions?
The text was updated successfully, but these errors were encountered: