keycloak-demo-frontend/Dockerfile

21 lines
525 B
Docker
Raw Normal View History

2021-09-06 10:00:03 +00:00
# BUILD STAGE
FROM node:14.14.0 as build
LABEL maintainer="Jason <jason@>"
WORKDIR /build
RUN npm install
COPY [".", "./"]
ARG APP_ENV_ARG="dev"
ENV APP_ENV ${APP_ENV_ARG}
RUN npm run test:coverage && npm run build
# FINAL STAGE
FROM nginx:alpine
EXPOSE 8080
RUN apk add --no-cache ca-certificates
RUN chmod a+rwx /var/cache/nginx /var/run /var/log/nginx
RUN sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf
COPY --from=build /build/build/ /usr/share/nginx/html/
COPY ["./default.conf", "/etc/nginx/conf.d/default.conf"]