2019-03-07 13:49:06 -08:00
|
|
|
ARG REPO=library
|
2020-01-21 17:44:02 -08:00
|
|
|
|
2020-01-30 11:09:56 -08:00
|
|
|
FROM multiarch/qemu-user-static:4.2.0-2 as qemu-user-static
|
2020-01-21 17:44:02 -08:00
|
|
|
# Make sure a dummy x86_64 file exists so that the copy command doesn't error
|
2020-01-30 11:09:56 -08:00
|
|
|
# RUN touch /usr/bin/qemu-x86_64-fake
|
2020-01-21 17:44:02 -08:00
|
|
|
|
2019-03-07 13:49:06 -08:00
|
|
|
FROM ${REPO}/python:3-alpine
|
|
|
|
|
2020-01-21 17:44:02 -08:00
|
|
|
# Copy mutliarch file to run builds on x86_64
|
2019-03-07 13:49:06 -08:00
|
|
|
ARG ARCH=x86_64
|
2020-01-30 11:09:56 -08:00
|
|
|
COPY --from=qemu-user-static /usr/bin/qemu-* /usr/bin/
|
|
|
|
# COPY --from=qemu-user-static /usr/bin/qemu-${ARCH}-* /usr/bin/
|
2019-03-05 11:16:45 -08:00
|
|
|
|
|
|
|
RUN mkdir -p /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
2020-01-21 17:44:02 -08:00
|
|
|
# Get Cloudflare example script
|
2021-01-20 16:35:35 -08:00
|
|
|
ENV CF_VERSION=2.8.15
|
2020-01-21 17:44:02 -08:00
|
|
|
ADD https://raw.githubusercontent.com/cloudflare/python-cloudflare/$CF_VERSION/examples/example_update_dynamic_dns.py ./update_ddns.py
|
2021-01-20 16:35:12 -08:00
|
|
|
RUN chmod +rx ./update_ddns.py
|
2019-03-05 11:16:45 -08:00
|
|
|
|
2021-01-20 17:32:46 -08:00
|
|
|
RUN python -m pip install -U setuptools
|
2021-01-20 17:27:33 -08:00
|
|
|
RUN python -m pip install --no-cache-dir cloudflare==$CF_VERSION
|
2019-03-05 11:16:45 -08:00
|
|
|
|
|
|
|
ENV DOMAIN=""
|
|
|
|
|
2019-06-03 16:00:31 -07:00
|
|
|
USER nobody
|
|
|
|
|
2020-01-21 17:44:02 -08:00
|
|
|
ENTRYPOINT [ "/src/update_ddns.py" ]
|