-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
50 lines (40 loc) · 1.34 KB
/
Dockerfile
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
47
48
49
50
FROM python:3-alpine AS builder
ENV PYTHONUNBUFFERED 1
# Install runtime dependencies
RUN apk --update upgrade && \
apk add --update inotify-tools exiftool zlib jpeg lcms2 tiff openjpeg su-exec && \
rm -rf /var/cache/apk/*
# Install build dependencies
RUN apk --update upgrade && \
apk add --update git \
build-base \
jpeg-dev \
zlib-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev && \
rm -rf /var/cache/apk/*
WORKDIR /wheels
RUN git clone https://github.com/jmathai/elodie.git /elodie && \
pip wheel --no-cache-dir -r /elodie/requirements.txt && \
rm -rf /elodie/.git
FROM python:3-alpine
LABEL maintainer="pierre@buyle.org"
ENV PYTHONUNBUFFERED 1
# Install runtime dependencies
RUN apk --update upgrade && \
apk add --update inotify-tools exiftool zlib jpeg lcms2 tiff openjpeg su-exec && \
rm -rf /var/cache/apk/*
COPY --from=builder /wheels /wheels
COPY --from=builder /elodie /elodie
WORKDIR /elodie
RUN pip install --no-cache-dir -r requirements.txt -f /wheels && \
rm -rf /wheels
COPY entrypoint.sh /entrypoint.sh
ENV PUID=1000
ENV PGID=1000
ENV SOURCE=/source
ENV DESTINATION=/destination
ENV ELODIE_APPLICATION_DIRECTORY=/elodie
ENV DEFAULT_COMMAND=watch
ENTRYPOINT ["/entrypoint.sh"]