openreplay/frontend/Dockerfile
rjshrjndrn 2458af460b feat(docker): switch to Chainguard nginx image
Replace nginx:alpine with cgr.dev/chainguard/nginx base image and
remove unnecessary permission changes since the Chainguard image
handles permissions differently and runs with proper security defaults.
2025-03-13 17:45:38 +01:00

24 lines
534 B
Docker

from node:18-slim AS builder
workdir /work
COPY . .
RUN cp .env.sample .env
RUN yarn
RUN yarn build
FROM nginx:alpine as cicd
LABEL maintainer=Rajesh<rajesh@openreplay.com>
COPY public /var/www/openreplay
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Default step in docker build
FROM cgr.dev/chainguard/nginx
LABEL maintainer=Rajesh<rajesh@openreplay.com>
ARG GIT_SHA
LABEL GIT_SHA=$GIT_SHA
COPY --from=builder /work/public /var/www/openreplay
COPY nginx.conf /etc/nginx/conf.d/default.conf
ENV GIT_SHA=$GIT_SHA
EXPOSE 8080