1+ # Get upstream code
2+ FROM alpine:latest AS cloner
3+ ARG VERSION
4+
5+ RUN apk update && apk upgrade && \
6+ apk add --no-cache git
7+
8+ RUN git clone -b $VERSION https://github.com/Dictionarry-Hub/profilarr.git /source
9+
10+ # ## STAGE 1: Build Profilarr ###
11+ FROM node:20-alpine AS build
12+ COPY --from=cloner /source /source
13+ WORKDIR /source
14+
15+ RUN cd ./frontend && \
16+ npm ci && \
17+ npm run build && \
18+ cd .. && \
19+ mkdir -p dist/backend dist/static && \
20+ cp -r frontend/dist/* dist/static/ && \
21+ cp -r backend/* dist/backend/ && \
22+ cp backend/requirements.txt dist/
23+
24+ # ## STAGE 2: Final Image ###
25+ FROM ghcr.io/ipromknight/ubuntu:rolling
26+
27+ ARG TARGETPLATFORM
28+ ARG BUILDPLATFORM
29+ ARG VERSION
30+ ARG CHANNEL
31+
32+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
33+
34+ RUN apt-get update && \
35+ apt-get install -y git && \
36+ rm -rf /var/lib/apt/lists/*
37+
38+ WORKDIR /app
39+
40+ COPY --from=build /source/dist/backend/app ./app
41+ COPY --from=build /source/dist/static ./app/static
42+ COPY --from=build /source/dist/requirements.txt .
43+
44+ RUN uv python install 3.9
45+
46+ RUN uv venv --python 3.9 && \
47+ . .venv/bin/activate && \
48+ uv pip install --upgrade pip wheel && \
49+ uv pip install --no-cache-dir -r requirements.txt
50+
51+ LABEL org.opencontainers.image.authors="Dictionarry dictionarry@pm.me"
52+ LABEL org.opencontainers.image.description="Profilarr - Profile manager for *arr apps"
53+ LABEL org.opencontainers.image.source="https://github.com/Dictionarry-Hub/profilarr"
54+ LABEL org.opencontainers.image.title="Profilarr"
55+ LABEL org.opencontainers.image.version="release"
56+
57+ EXPOSE 6868
58+
59+ COPY --chmod=0755 apps/profilarr/promknight-entrypoint.sh /promknight-entrypoint.sh
0 commit comments