fix: persist config across restarts
- root cause: Technitium image ships /etc/dns as a real directory, so the build-time 'ln -sf /data/dns /etc/dns' created the symlink INSIDE it (/etc/dns/dns) instead of replacing it. Technitium kept writing to the ephemeral container directory and lost everything on restart. - fix: add entrypoint.sh that runs at container start (after HA mounts volumes), removes the real /etc/dns dir, and symlinks it to /config/dns (the persistent addon_config mount). Seeds defaults on first run only. - bump version to 15.4.2
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base:latest
|
||||
FROM technitium/dns-server:latest
|
||||
|
||||
ENV DATA_DIR="/data/dns" \
|
||||
DNS_SERVER_WEB_SERVICE_HTTPS_PORT=53443 \
|
||||
ENV DNS_SERVER_WEB_SERVICE_HTTPS_PORT=53443 \
|
||||
DNS_SERVER_WEB_SERVICE_ENABLE_HTTPS=false
|
||||
|
||||
RUN mkdir -p /data/dns && \
|
||||
ln -sf /data/dns /etc/dns
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD ["dotnet", "DnsServerApp.dll"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user