-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (21 loc) · 820 Bytes
/
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
FROM python:3-alpine AS gphotos-sync-builder
RUN apk add --update --no-cache gcc musl-dev linux-headers \
&& rm -rf /var/cache/apk/*
ENV PYTHONDONTWRITEBYTECODE=1
RUN python -m venv --system-site-packages /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir --upgrade gphotos-sync
FROM python:3-alpine
COPY --from=gphotos-sync-builder /opt/venv /opt/venv
RUN URL=http://downloads.rclone.org/current/rclone-current-linux-amd64.zip ; \
URL=${URL/\/current/} ; \
cd /tmp \
&& wget -q $URL \
&& unzip /tmp/rclone-current-linux-amd64.zip \
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/bin \
&& rm -r /tmp/rclone* \
&& apk add --no-cache --update bash
COPY entrypoint.sh /entrypoint.sh
ENV PATH="/opt/venv/bin:$PATH"
RUN chmod +x /entrypoint.sh
CMD [ "/bin/sh", "/entrypoint.sh" ]