oktopus/frontend/build/Dockerfile
2024-04-10 17:03:59 +00:00

30 lines
579 B
Docker

FROM node:16.20.2-alpine as builder
WORKDIR /app
COPY ./ ./
RUN npm install
RUN NEXT_PUBLIC_REST_ENPOINT=REST_API_URL NEXT_PUBLIC_WS_ENPOINT=WS_URL npm run build
RUN ls -la && echo "Listing directory contents done"
FROM node:16.20.2-alpine as runner
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/build/entrypoint.sh ./entrypoint.sh
COPY --from=builder /app/public ./public
RUN npm install
RUN chmod 755 entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
CMD [ "npm", "run", "start" ]