Initial commit for ClamAV Proxmox OCI
This commit is contained in:
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM clamav/clamav:1.3
|
||||
|
||||
# 1. Install Alpine network tools
|
||||
# 'ifupdown-ng' is the modern network manager for Alpine
|
||||
RUN apk update && apk add --no-cache \
|
||||
ifupdown-ng \
|
||||
iproute2 \
|
||||
nano
|
||||
|
||||
# 2. Copy and Prep Script
|
||||
COPY start_network.sh /start_network.sh
|
||||
RUN chmod +x /start_network.sh
|
||||
|
||||
ENTRYPOINT ["/start_network.sh"]
|
||||
31
start_network.sh
Normal file
31
start_network.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
# --- CONFIGURATION ---
|
||||
IP=${STATIC_IP:-"192.168.0.116/24"}
|
||||
GW=${STATIC_GW:-"192.168.0.1"}
|
||||
DNS=${STATIC_DNS:-"192.168.0.113"}
|
||||
|
||||
echo "--- ClamAV Network Init ---"
|
||||
echo "Using IP: $IP"
|
||||
|
||||
# 1. Generate Network Config (Alpine Syntax)
|
||||
cat <<EOF > /etc/network/interfaces
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address $IP
|
||||
gateway $GW
|
||||
EOF
|
||||
|
||||
# 2. Set DNS
|
||||
echo "nameserver $DNS" > /etc/resolv.conf
|
||||
|
||||
# 3. Wait for Hardware & Start Network
|
||||
sleep 5
|
||||
ifup eth0
|
||||
|
||||
# 4. Launch ClamAV (The official entrypoint is /init)
|
||||
echo "--- Starting ClamAV ---"
|
||||
exec /init "$@"
|
||||
Reference in New Issue
Block a user