-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev_server
More file actions
46 lines (37 loc) · 1.62 KB
/
Copy pathDockerfile.dev_server
File metadata and controls
46 lines (37 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ---------- Stage 1: build exiftool ----------
FROM debian:trixie-slim AS exiftool-build
ARG EXIFTOOL_VERSION=13.36
RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates perl make \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL -o /tmp/exiftool.tar.gz https://sourceforge.net/projects/exiftool/files/Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz/download \
&& tar -xzf /tmp/exiftool.tar.gz -C /tmp \
&& cd /tmp/Image-ExifTool-${EXIFTOOL_VERSION} \
&& perl Makefile.PL INSTALLMAN1DIR= \
&& make test \
&& make install DESTDIR=/tmp/exiftool-root
# Result goes to /tmp/exiftool-root/usr/local/{bin,lib,share/...}
# ---------- Stage 2: mirage dev app ----------
FROM python:3.12.12-slim-trixie
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
perl ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy exiftool from the build stage
COPY --from=exiftool-build /tmp/exiftool-root/usr/local/bin/exiftool /usr/local/bin/exiftool
COPY --from=exiftool-build /tmp/exiftool-root/usr/local/lib/ /usr/local/lib/
COPY --from=exiftool-build /tmp/exiftool-root/usr/local/share/perl/ /usr/local/share/perl/
# Python deps
COPY requirements.txt ./
ENV PIP_ROOT_USER_ACTION=ignore
RUN pip install --no-cache-dir -U pip \
&& pip install --no-cache-dir -r requirements.txt
# App code
# Note: Source code is mounted from host in dev setup
COPY .env ./
VOLUME ["/mirage/DRIVE", "/mirage/backup", "/mirage/logs"]
EXPOSE 5000
ENV FLASK_APP=wsgi.py FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000 FLASK_DEBUG=1
# Set default command
CMD ["flask", "run"]