Files
SWA-frontend/Dockerfile

26 lines
360 B
Docker

FROM alpine AS npm
RUN apk add npm
FROM npm AS npm-installed
WORKDIR source
ADD package.json .
RUN npm install
FROM npm-installed AS builder
ADD . .
RUN npm run build --production
FROM nginx:stable-alpine3.17-slim
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
COPY --from=builder /source/build /usr/share/nginx/html
ENTRYPOINT ["./entrypoint.sh"]