From a89a263250cead43cedb7b04ed73a05d52ade35e Mon Sep 17 00:00:00 2001 From: cn Date: Thu, 30 Jul 2020 19:49:31 +0200 Subject: [PATCH] docs: add example Dockerfile --- README.md | 6 ++++-- docs/Dockerfile | 15 +++++++++++++++ .../debian-6-init-dyndnsd | 0 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 docs/Dockerfile rename init.d/debian-6-dyndnsd => docs/debian-6-init-dyndnsd (100%) mode change 100644 => 100755 diff --git a/README.md b/README.md index 0c3ea77..856ad9d 100644 --- a/README.md +++ b/README.md @@ -187,9 +187,11 @@ If you want to provide an additional IPv6 address as myip6 parameter, the myip p Use a webserver as a proxy to handle SSL and/or multiple listen addresses and ports. DynDNS.com provides HTTP on port 80 and 8245 and HTTPS on port 443. -### Init scripts +### Startup -The [Debian 6 init.d script](init.d/debian-6-dyndnsd) assumes that dyndnsd.rb is installed into the system ruby (no RVM support) and the config.yaml is at /opt/dyndnsd/config.yaml. Modify to your needs. +There is a [Dockerfile](docs/Dockerfile) that can be used to build a Docker image for running dyndnsd.rb. + +The [Debian 6 init.d script](docs/debian-6-init-dyndnsd) assumes that dyndnsd.rb is installed into the system ruby (no RVM support) and the config.yaml is at /opt/dyndnsd/config.yaml. Modify to your needs. ### Monitoring diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..c138b7d --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,15 @@ +FROM alpine:3.12 + +EXPOSE 5353 8080 + +ENV VERSION=3.0.0 + +RUN apk --no-cache add openssl ca-certificates && \ + apk --no-cache add ruby ruby-etc ruby-io-console ruby-json ruby-webrick && \ + apk --no-cache add --virtual .build-deps ruby-dev build-base tzdata && \ + gem install --no-document dyndnsd -v ${VERSION} && \ + # set timezone to Berlin + cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \ + apk del .build-deps + +ENTRYPOINT ["dyndnsd", "/etc/dyndnsd/config.yml"] diff --git a/init.d/debian-6-dyndnsd b/docs/debian-6-init-dyndnsd old mode 100644 new mode 100755 similarity index 100% rename from init.d/debian-6-dyndnsd rename to docs/debian-6-init-dyndnsd