changes
This commit is contained in:
29
.woodpecker.yml
Normal file
29
.woodpecker.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
steps:
|
||||
build:
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
repo: ${FORGE_NAME}/${CI_REPO}
|
||||
registry:
|
||||
from_secret: container_registry
|
||||
tags: latest,${CI_COMMIT_SHA}
|
||||
username:
|
||||
from_secret: container_registry_username
|
||||
password:
|
||||
from_secret: container_registry_password
|
||||
|
||||
dockerfile: Dockerfile
|
||||
when:
|
||||
- event: [tag,push]
|
||||
|
||||
deploy:
|
||||
image: portainer/kubectl-shell:latest
|
||||
environment:
|
||||
KUBE_CONFIG_CONTENT:
|
||||
from_secret: kube_config
|
||||
commands:
|
||||
- export IMAGE_TAG=$CI_COMMIT_SHA
|
||||
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
||||
- export KUBECONFIG=/tmp/kubeconfig
|
||||
- ./deployment/deploy.sh
|
||||
when:
|
||||
- event: [tag,push]
|
||||
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM alpine:3.22.2
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||
LABEL ImageName="bind-hidden-primary"
|
||||
|
||||
RUN apk add --no-cache bind bind-tools bash git openssh-client-default
|
||||
RUN mkdir -p /etc/named-dist
|
||||
|
||||
COPY named.conf /etc/named-dist/
|
||||
COPY whiskeylimahotel.de.zone /etc/named-dist/
|
||||
COPY zones.conf /etc/named-dist/
|
||||
COPY transfer-key.conf /etc/named-dist/
|
||||
COPY start.sh /usr/local/bin/start.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/start.sh
|
||||
|
||||
WORKDIR /etc/named
|
||||
VOLUME /etc/named/zones
|
||||
VOLUME /etc/named/keys
|
||||
|
||||
EXPOSE 8053/udp
|
||||
EXPOSE 8053/tcp
|
||||
|
||||
CMD [ "/usr/local/bin/start.sh" ]
|
||||
|
||||
|
||||
26
start.sh
Executable file
26
start.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
echo "Starting BIND initialization..."
|
||||
|
||||
mkdir -p /etc/named
|
||||
|
||||
# Copy template files to working directories if they don't exist
|
||||
if [ ! -f /etc/knot/knot.conf ]; then
|
||||
echo "Copying knot.conf from template..."
|
||||
cp /etc/knot-dist/knot.conf /etc/knot/
|
||||
|
||||
echo "Copying zone file from template..."
|
||||
cp /var/lib/knot-dist/my-dnssec-test-domain.de.zone /var/lib/knot/
|
||||
fi
|
||||
|
||||
# Ensure proper ownership
|
||||
echo "Setting file ownership..."
|
||||
chown -R knot:knot /etc/knot /var/lib/knot
|
||||
|
||||
# Check configuration
|
||||
echo "Validating configuration..."
|
||||
/usr/sbin/knotc conf-check
|
||||
|
||||
echo "Starting Knot DNS server..."
|
||||
exec /usr/sbin/knotd
|
||||
Reference in New Issue
Block a user