2019-03-07 21:49:06 +00:00
|
|
|
ARG REPO=library
|
2020-01-22 01:44:02 +00:00
|
|
|
|
|
|
|
FROM multiarch/qemu-user-static:4.1.0-1 as qemu-user-static
|
|
|
|
# Make sure a dummy x86_64 file exists so that the copy command doesn't error
|
|
|
|
RUN touch /usr/bin/qemu-x86_64-fake
|
|
|
|
|
2019-03-07 21:49:06 +00:00
|
|
|
FROM ${REPO}/python:3-alpine
|
|
|
|
|
2020-01-22 01:44:02 +00:00
|
|
|
# Copy mutliarch file to run builds on x86_64
|
2019-03-07 21:49:06 +00:00
|
|
|
ARG ARCH=x86_64
|
2020-01-22 01:44:02 +00:00
|
|
|
COPY --from=qemu-user-static /usr/bin/qemu-${ARCH}-* /usr/bin/
|
2019-03-05 19:16:45 +00:00
|
|
|
|
|
|
|
RUN mkdir -p /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
2020-01-22 01:44:02 +00:00
|
|
|
# Get Cloudflare example script
|
|
|
|
ENV CF_VERSION=2.6.0
|
|
|
|
ADD https://raw.githubusercontent.com/cloudflare/python-cloudflare/$CF_VERSION/examples/example_update_dynamic_dns.py ./update_ddns.py
|
|
|
|
RUN chmod +x ./update_ddns.py
|
2019-03-05 19:16:45 +00:00
|
|
|
|
2020-01-22 01:44:02 +00:00
|
|
|
RUN pip install cloudflare==$CF_VERSION
|
2019-03-05 19:16:45 +00:00
|
|
|
|
|
|
|
ENV DOMAIN=""
|
|
|
|
|
2019-06-03 23:00:31 +00:00
|
|
|
USER nobody
|
|
|
|
|
2020-01-22 01:44:02 +00:00
|
|
|
ENTRYPOINT [ "/src/update_ddns.py" ]
|