-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 817 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (17 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.14.5-alpine
LABEL maintainer="Imogen Labs (github.com/smashingtags)"
LABEL org.opencontainers.image.source="https://github.com/smashingtags/cf-companion"
LABEL org.opencontainers.image.description="Auto-create Cloudflare DNS records for containers with Traefik labels"
RUN apk add --no-cache gcc musl-dev libffi-dev && \
pip install --no-cache-dir \
"docker>=7.0.0" \
"cloudflare>=4.1.0,<5.0.0" \
get-docker-secret \
requests && \
apk del gcc musl-dev libffi-dev
RUN addgroup -g 1001 -S cfcompanion && \
adduser -S cfcompanion -u 1001 -G cfcompanion && \
mkdir -p /logs && chown cfcompanion:cfcompanion /logs
COPY app/cloudflare-companion.py /app/cloudflare-companion.py
USER cfcompanion
ENTRYPOINT ["python3", "-u", "/app/cloudflare-companion.py"]