docker-cloudflare-ddns/Dockerfile
Ian Fijolek 3402b91b04
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
Contain entire build in Dockerfile
Rather than pulling and storing the py file, having start script
and fetching of qemu files here, everything can just be done in the
Dockerfile.
2020-01-23 17:49:12 -08:00

28 lines
706 B
Docker

ARG REPO=library
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
FROM ${REPO}/python:3-alpine
# Copy mutliarch file to run builds on x86_64
ARG ARCH=x86_64
COPY --from=qemu-user-static /usr/bin/qemu-${ARCH}-* /usr/bin/
RUN mkdir -p /src
WORKDIR /src
# 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
RUN pip install cloudflare==$CF_VERSION
ENV DOMAIN=""
USER nobody
ENTRYPOINT [ "/src/update_ddns.py" ]