Files
ai-media-hub/Dockerfile
AI Assistant af6deb885c
All checks were successful
build-push / docker (push) Successful in 6m1s
Speed up image build by reusing static ffmpeg
2026-03-12 16:04:54 +09:00

30 lines
818 B
Docker

FROM golang:1.24-bookworm AS go-builder
WORKDIR /src
COPY go.mod go.sum ./
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
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
EXPOSE 8080
CMD ["/app/ai-media-hub"]