Skip to content

Instantly share code, notes, and snippets.

@kufre-abasi
Forked from bbachi/Dockerfile
Created July 28, 2023 07:55
Show Gist options
  • Save kufre-abasi/00465ace104e194b6c69145adc5d6dcb to your computer and use it in GitHub Desktop.
Save kufre-abasi/00465ace104e194b6c69145adc5d6dcb to your computer and use it in GitHub Desktop.
webapp
FROM node:10 AS ui-build
WORKDIR /usr/src/app
COPY my-app/ ./my-app/
RUN cd my-app && npm install && npm run build
FROM node:10 AS server-build
WORKDIR /root/
COPY --from=ui-build /usr/src/app/my-app/dist ./my-app/dist
COPY api/package*.json ./api/
RUN cd api && npm install
COPY api/server.js ./api/
EXPOSE 3080
CMD ["node", "./api/server.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment