Speed up image build by reusing static ffmpeg
All checks were successful
build-push / docker (push) Successful in 6m1s
All checks were successful
build-push / docker (push) Successful in 6m1s
This commit is contained in:
@@ -5,21 +5,21 @@ RUN go mod download
|
||||
COPY backend ./backend
|
||||
RUN go build -o /out/ai-media-hub ./backend
|
||||
|
||||
FROM mwader/static-ffmpeg:7.1.1 AS ffmpeg
|
||||
|
||||
FROM python:3.12-slim-bookworm
|
||||
ENV APP_ROOT=/app \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY worker/requirements.txt /app/worker/requirements.txt
|
||||
RUN python -m pip install --no-cache-dir --upgrade pip \
|
||||
&& python -m pip install --no-cache-dir -r /app/worker/requirements.txt
|
||||
|
||||
COPY --from=go-builder /out/ai-media-hub /app/ai-media-hub
|
||||
COPY --from=ffmpeg /ffmpeg /usr/local/bin/ffmpeg
|
||||
COPY --from=ffmpeg /ffprobe /usr/local/bin/ffprobe
|
||||
COPY worker /app/worker
|
||||
COPY frontend /app/frontend
|
||||
RUN mkdir -p /app/db /app/downloads
|
||||
|
||||
Reference in New Issue
Block a user