Newer
Older
FROM registry.gitlab.open-xchange.com/frontend/dev_env/node_builder:latest AS builder
ARG APP_VERSION
ARG BUILD_TIMESTAMP
ARG CI_COMMIT_SHA
WORKDIR /app
COPY . /app
RUN yarn && npx grunt
FROM nginxinc/nginx-unprivileged:stable as base
RUN mkdir -p /tmp/root/var/cache/nginx && \
cp -a --parents /usr/lib/nginx \
/usr/share/nginx \
/var/log/nginx \
/etc/nginx \
/usr/sbin/nginx \
/usr/sbin/nginx-debug \
/lib/*/ld-* \
/lib/*/libc* \
/lib/*/libdl* \
/lib/*/libpthread* \
/tmp/root
FROM gcr.io/distroless/base
USER 1000
EXPOSE 8080
COPY --from=base /tmp/root /
COPY --from=builder /app/build /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]