Python2 is no longer in the Alpine repos. Skip pip and just use the awscli from Alpine, which is on Python 3.
21 lines
483 B
Docker
21 lines
483 B
Docker
FROM alpine:3
|
|
|
|
RUN apk -v --update add \
|
|
bash \
|
|
aws-cli \
|
|
jq \
|
|
wget \
|
|
&& \
|
|
apk -v --purge del py-pip && \
|
|
rm /var/cache/apk/*
|
|
|
|
COPY ./update-dns.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/update-dns.sh
|
|
|
|
RUN mkdir -p /etc/cron.d/
|
|
RUN echo -e "*/10 * * * * /bin/bash update-dns.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/dns-cron
|
|
RUN crontab /etc/cron.d/dns-cron
|
|
RUN touch /var/log/cron.log
|
|
|
|
CMD crond && tail -f /var/log/cron.log
|