Closed KarthiAru closed 3 years ago
Hi, looks like your packge.json COPY is done in a sub folder whereas your COPY . . is done on the parent folder this means you are not mounting your code in the write folder :) have you tried COPY ./-my-project/
@alexandrebodin Thanks. The issue was with mounting the project folder.
This is my working Dockerfile.
FROM strapi/base
WORKDIR /srv/app
COPY ./package.json ./
COPY ./package-lock.json ./
RUN npm install
COPY ./my-project/ /srv/app
RUN npm run build
EXPOSE 1337
ENV NODE_ENV production
CMD ["npm", "start"]
Hi,
I'm getting the missing api folder error. There is an api folder in the project folder.
This is my DockerFile
This is
my-project
directory. This was created by running the cli commandsnpx create-strapi-app my-project
andnpm run develop