2022-08-19 16:51:47 -07:00

38 lines
1.2 KiB
Docker

FROM debian:buster
######
## Install cloudflared tool
######
# Instructions from https://pkg.cloudflare.com/
RUN apt update && apt -y upgrade
# These two utilities are required but are (understandably) not listed
# in pkg.cloudflare.com's instructions
RUN apt install -y curl ca-certificates
# This utility is required for installation of yq - but we put it earlier
# to maximize build cache hits
RUN apt install -y wget
RUN mkdir -p --mode=0755 /usr/share/keyrings
RUN curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg\
| tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
# Do not try to line-break in the middle of the quoted string!
RUN echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared buster main' \
| tee /etc/apt/sources.list.d/cloudflared.list
RUN apt update && apt install cloudflared
######
## Install yq (for parsing YAML)
######
# https://github.com/mikefarah/yq - I tried switching to `curl -o -` but that gave no output?
RUN wget https://github.com/mikefarah/yq/releases/download/v4.18.1/yq_linux_arm64.tar.gz -O - 2>/dev/null |\
tar xz && mv yq_linux_arm64 /usr/bin/yq
######
## Install own script
######
COPY dns_update.sh .