Frontend finished
This commit is contained in:
20
frontend/Dockerfile
Normal file
20
frontend/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# stage 1: build node frontend
|
||||
FROM node:21 as node-builder
|
||||
|
||||
WORKDIR /node-builder
|
||||
|
||||
COPY ./package.json .
|
||||
COPY ./package-lock.json .
|
||||
COPY ./public ./public
|
||||
COPY ./src ./src
|
||||
|
||||
RUN \
|
||||
npm install && \
|
||||
npm run build
|
||||
|
||||
|
||||
# stage 2: build final image
|
||||
FROM nginx:1.25-alpine
|
||||
|
||||
COPY --from=node-builder /node-builder/build/. /usr/share/nginx/html
|
||||
RUN ls -alF /usr/share/nginx/html
|
||||
Reference in New Issue
Block a user