Files
Tradarr/frontend/Dockerfile
2026-04-21 08:49:36 +02:00

25 lines
633 B
Docker

FROM node:22 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends librsvg2-bin && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
COPY . .
# Generate PNG icons from SVG source
RUN mkdir -p public/icons && \
rsvg-convert -w 192 -h 192 public/icon-source.svg -o public/icons/icon-192.png && \
rsvg-convert -w 512 -h 512 public/icon-source.svg -o public/icons/icon-512.png
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]