first commit 🚀
This commit is contained in:
commit
d3cfe6540d
10 changed files with 155 additions and 0 deletions
43
.github/workflows/docker_build_push.yml
vendored
Executable file
43
.github/workflows/docker_build_push.yml
vendored
Executable file
|
@ -0,0 +1,43 @@
|
|||
name: Build and push dyndns-netcup
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
-
|
||||
name: Set up variables
|
||||
run: |
|
||||
VER=$(cat ./docker-build/VERSION)
|
||||
echo "VERSION=$VER" >> $GITHUB_ENV
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./docker-build
|
||||
file: ./docker-build/Dockerfile
|
||||
platforms: |
|
||||
linux/arm/v7
|
||||
linux/arm64
|
||||
linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_USER }}/docker-owndyndns-netcup:${{ env.VERSION }}
|
||||
${{ secrets.DOCKER_USER }}/docker-owndyndns-netcup:latest
|
1
.gitignore
vendored
Executable file
1
.gitignore
vendored
Executable file
|
@ -0,0 +1 @@
|
|||
.env
|
3
.vscode/settings.json
vendored
Executable file
3
.vscode/settings.json
vendored
Executable file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"ansible.python.interpreterPath": "/usr/bin/python3"
|
||||
}
|
43
README.md
Executable file
43
README.md
Executable file
|
@ -0,0 +1,43 @@
|
|||
# ownDynDNS-netcup
|
||||
|
||||

|
||||
|
||||
|
||||
This container is based on the work of:
|
||||
* [PHP](https://hub.docker.com/_/php)
|
||||
* [Fernwerker ownDynDNS](https://github.com/fernwerker/ownDynDNS)
|
||||
|
||||
## Nectup configuration
|
||||
You need to create your dns entries beforehand:
|
||||
|
||||
| Host | Type | Destination |
|
||||
|----------|-------|--------------|
|
||||
| vpn | AAAA | IPv6 |
|
||||
| vpn | A | IPv4 |
|
||||
|
||||
## Container configuration
|
||||
Create docker-compose.yml and config in your app directory i.e.:
|
||||
|
||||
```
|
||||
mkdir -p /opt/docker/owndyndns
|
||||
cd /opt/docker/owndyndns
|
||||
|
||||
# Create docker-compose.yml and copy the contents from repository file
|
||||
vi docker-compose.yml
|
||||
|
||||
# Create config, copy the contents from repository file and change the parameters
|
||||
vi config
|
||||
|
||||
# Start the Container with
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Fritz!Box configuration
|
||||
* Login to your Fritz!Box
|
||||
* Go to /Internet/Freigabe/DynDNS
|
||||
* Set mark on "DynDNS benutzen"
|
||||
* Enter Update-URL: `https://<url of your webspace>/update.php?user=<username>&password=<pass>&ipv4=<ipaddr>&ipv6=<ip6addr>&domain=<domain>`
|
||||
* You only have to change `https://<url of your webspace>` (http without valid TLS certificate)
|
||||
* Domainname: `vpn.example.com`
|
||||
* Username: Defined in config
|
||||
* Password: Defined in config
|
8
config
Executable file
8
config
Executable file
|
@ -0,0 +1,8 @@
|
|||
username="max_mustermann"
|
||||
password="s3cr3t"
|
||||
customerId="netcup customer ID"
|
||||
apiKey="netcup DNS API Key"
|
||||
apiPassword="netcup DNS API Password"
|
||||
debug=true
|
||||
log=true
|
||||
logFile=log.json
|
20
docker-build/Dockerfile
Executable file
20
docker-build/Dockerfile
Executable file
|
@ -0,0 +1,20 @@
|
|||
# Get latest app version
|
||||
FROM alpine/git
|
||||
WORKDIR /clone-workspace
|
||||
RUN git clone https://github.com/fernwerker/ownDynDNS.git
|
||||
|
||||
# Build container to run the app
|
||||
FROM php:apache
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y \
|
||||
libxml2-dev && \
|
||||
apt-get clean -y && \
|
||||
docker-php-ext-install soap
|
||||
|
||||
WORKDIR /var/www/html
|
||||
COPY --from=0 /clone-workspace/ownDynDNS /var/www/html
|
||||
COPY --from=0 /clone-workspace/ownDynDNS/.htaccess.example /var/www/html/.htaccess
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html/
|
20
docker-build/README.md
Executable file
20
docker-build/README.md
Executable file
|
@ -0,0 +1,20 @@
|
|||
# Build it yourself
|
||||
|
||||
https://docs.docker.com/buildx/working-with-buildx/#work-with-builder-instances
|
||||
|
||||
```
|
||||
# This creates a new builder instance with a single node based on your current configuration.
|
||||
docker buildx create
|
||||
# To list all available builders, use
|
||||
docker buildx ls
|
||||
# To switch between different builders, use
|
||||
docker buildx use <name>
|
||||
# After creating a new instance, you can delete it with
|
||||
docker buildx rm <name>
|
||||
```
|
||||
|
||||
Build it as a multi-platform image:
|
||||
```
|
||||
chmod +x build_and_push.sh
|
||||
./build_and_push.sh
|
||||
```
|
1
docker-build/VERSION
Executable file
1
docker-build/VERSION
Executable file
|
@ -0,0 +1 @@
|
|||
2024.05.0
|
2
docker-build/build_and_push.sh
Executable file
2
docker-build/build_and_push.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t sujiba/docker-owndyndns-netcup:`cat VERSION` --push .
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t sujiba/docker-owndyndns-netcup:latest --push .
|
14
docker-compose.yaml
Executable file
14
docker-compose.yaml
Executable file
|
@ -0,0 +1,14 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
ownDynDNS:
|
||||
image: sujiba/docker-owndyndns-netcup
|
||||
container_name: ownDynDNS
|
||||
# Run container behind reverse proxy
|
||||
ports:
|
||||
- "127.0.0.1:8081:80"
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
volumes:
|
||||
- ./config:/var/www/html/ownDynDNS/.env
|
||||
restart: unless-stopped
|
Loading…
Add table
Add a link
Reference in a new issue