fedisearch/Dockerfile

25 wiersze
594 B
Docker
Czysty Zwykły widok Historia

FROM node:18-bullseye AS prebuild
FROM prebuild AS build
2022-01-01 19:37:33 +00:00
WORKDIR /srv
COPY application/package*.json ./
RUN yarn install
2022-01-01 19:37:33 +00:00
COPY application/. .
2023-01-05 21:33:45 +00:00
RUN chmod -R uog+r .
RUN yarn build
2022-01-01 19:37:33 +00:00
FROM build as dev
CMD yarn dev
2022-01-01 19:37:33 +00:00
FROM prebuild AS prod
2022-01-01 19:37:33 +00:00
RUN groupadd -g 1001 nodejs
RUN useradd -u 1001 -g 1001 nextjs
USER nextjs
EXPOSE 3000
WORKDIR /srv
COPY --from=build /srv/node_modules ./node_modules
COPY --from=build /srv/package*.json ./
2023-01-05 21:33:45 +00:00
COPY --from=build /srv/next.config.js ./
COPY --from=build --chown=nextjs:nodejs /srv/src/.next ./src/.next
COPY --from=build /srv/src/public ./src/public
CMD yarn start