Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ matrix:
- env: SUB_IMAGE=openskynetwork
- env: SUB_IMAGE=planefinder
- env: SUB_IMAGE=virtualradar
- env: SUB_IMAGE=duckdns

before_install:
# exit on error
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,19 @@ services:
limits:
cpus: '0.75'
memory: 512M

# duckdns ###################################################################
duckdns:
image: thebiggerguy/docker-ads-b-duckdns:${TAG:-latest}
build:
context: duckdns
dockerfile: Dockerfile-duckdns
#cache_from:
# - thebiggerguy/docker-ads-b-duckdns
# - thebiggerguy/docker-ads-b-duckdns:${TAG:-latest}
env_file:
- variables-duckdns.env
deploy:
restart_policy:
condition: always
delay: 5s
22 changes: 22 additions & 0 deletions duckdns/Dockerfile-duckdns
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM multiarch/alpine:armhf-v3.12

RUN apk add --no-cache curl ca-certificates

COPY duckdns-cron /etc/cron.d/duckdns-cron
RUN chmod 0644 /etc/cron.d/duckdns-cron
RUN crontab /etc/cron.d/duckdns-cron

COPY duckdns.sh /usr/local/bin/duckdns
RUN chmod 0700 /usr/local/bin/duckdns

ENTRYPOINT ["crond", "-f"]

# Metadata
ARG VCS_REF="Unknown"
LABEL maintainer="adsb@thebiggerguy.net" \
org.label-schema.name="Docker ADS-B - DuckDNS" \
org.label-schema.description="Docker container for ADS-B - This is the duckdns.com component" \
org.label-schema.url="https://github.com/TheBiggerGuy/docker-ads-b" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="https://github.com/TheBiggerGuy/docker-ads-b" \
org.label-schema.schema-version="1.0"
2 changes: 2 additions & 0 deletions duckdns/duckdns-cron
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/5 * * * * duckdns >/proc/1/fd/1 2>/proc/1/fd/2
# An empty line is required at the end of this file for a valid cron file.
17 changes: 17 additions & 0 deletions duckdns/duckdns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -o errexit # Exit on most errors (see the manual)
#set -o errtrace # Make sure any error trap is inherited
set -o nounset # Disallow expansion of unset variables
#set -o pipefail # Use last non-zero exit code in a pipeline
#set -o xtrace # Trace the execution of the script (debug)


echo "Read DUCKDNS_DOMAIN=${DUCKDNS_DOMAIN}"
echo "Read DUCKDNS_TOKEN=$(echo "${DUCKDNS_TOKEN}" | sed -E 's/(...).*(...)/\1*****\2/g')"
echo

echo "Updating DuckDNS"
curl -A 'TheBiggerGuy/docker-ads-b' --silent "https://www.duckdns.org/update?domains=${DUCKDNS_DOMAIN}&token=${DUCKDNS_TOKEN}&ip="
echo
echo "DuckDNS updated"
4 changes: 4 additions & 0 deletions variables-duckdns.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# variables-duckdns

DUCKDNS_DOMAIN=
DUCKDNS_TOKEN=