Add Pi-hole with AdGuard DOH/DOT integration, reorganize swarm stacks, add DNS/n8n docs
This commit is contained in:
BIN
builds/ubuntu-unbound/.DS_Store
vendored
Normal file
BIN
builds/ubuntu-unbound/.DS_Store
vendored
Normal file
Binary file not shown.
75
builds/ubuntu-unbound/Dockerfile
Normal file
75
builds/ubuntu-unbound/Dockerfile
Normal file
@@ -0,0 +1,75 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Avoid prompts during package installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=UTC
|
||||
|
||||
# Set ZSH as default shell
|
||||
ENV SHELL=/usr/bin/zsh
|
||||
|
||||
# Install essential packages
|
||||
RUN apt update && apt install -y \
|
||||
# DNS and networking
|
||||
unbound \
|
||||
dnsutils \
|
||||
bind9-utils \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
traceroute \
|
||||
curl \
|
||||
wget \
|
||||
# SSH server
|
||||
openssh-server \
|
||||
# Shell and utilities
|
||||
zsh \
|
||||
git \
|
||||
vim \
|
||||
nano \
|
||||
htop \
|
||||
tmux \
|
||||
tree \
|
||||
ncdu \
|
||||
# System tools
|
||||
sudo \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-release \
|
||||
software-properties-common \
|
||||
# Build tools (useful for compiling)
|
||||
build-essential \
|
||||
# Process management
|
||||
supervisor \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Oh My Zsh (for root)
|
||||
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||||
|
||||
# Set ZSH as default shell for root
|
||||
RUN chsh -s /usr/bin/zsh root
|
||||
|
||||
# Configure SSH
|
||||
RUN mkdir /var/run/sshd && \
|
||||
# Change SSH port to 2222
|
||||
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
||||
# Enable root login (change to 'no' if you want to create a separate user)
|
||||
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
|
||||
# SSH login fix for container
|
||||
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
|
||||
|
||||
# Set a default root password (CHANGE THIS!)
|
||||
RUN echo 'root:changeme123' | chpasswd
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p /var/log/supervisor /config/unbound /config/supervisor
|
||||
|
||||
# Copy supervisor configuration
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 2222 5335
|
||||
|
||||
# Working directory
|
||||
WORKDIR /config
|
||||
|
||||
# Start supervisor
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
23
builds/ubuntu-unbound/docker-compose.yml
Normal file
23
builds/ubuntu-unbound/docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
ubuntu-server:
|
||||
build: .
|
||||
container_name: ubuntu_server
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
privileged: true
|
||||
environment:
|
||||
- TZ=America/New_York # Change to your timezone
|
||||
volumes:
|
||||
- ubuntu_data:/data
|
||||
- ubuntu_config:/config
|
||||
ports:
|
||||
- "2222:2222" # SSH
|
||||
- "5335:5335" # Unbound DNS
|
||||
|
||||
volumes:
|
||||
ubuntu_data:
|
||||
driver: local
|
||||
ubuntu_config:
|
||||
driver: local
|
||||
19
builds/ubuntu-unbound/supervisord.conf
Normal file
19
builds/ubuntu-unbound/supervisord.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
user=root
|
||||
|
||||
[program:sshd]
|
||||
command=/usr/sbin/sshd -D
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/sshd.err.log
|
||||
stdout_logfile=/var/log/sshd.out.log
|
||||
|
||||
[program:unbound]
|
||||
command=/usr/sbin/unbound -d -c /config/unbound/minimal.conf
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/unbound.err.log
|
||||
stdout_logfile=/var/log/unbound.out.log
|
||||
Reference in New Issue
Block a user