Initial commit for Collabora OCI

This commit is contained in:
root
2025-12-20 19:15:43 -08:00
commit 822e5e9765
2 changed files with 62 additions and 0 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM collabora/code:latest
# 1. Switch to Root
USER root
# 2. Install Network Tools
# We install 'adduser' and 'debconf' first to fix the installation script errors.
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
adduser \
debconf \
apt-utils \
&& \
apt-get install -y \
ifupdown \
iproute2 \
iputils-ping \
nano \
&& rm -rf /var/lib/apt/lists/*
# 3. Add Script
COPY start_network.sh /start_network.sh
RUN chmod +x /start_network.sh
# 4. Default Environment Variables
ENV extra_params="--o:ssl.enable=false --o:ssl.termination=true"
ENTRYPOINT ["/start_network.sh"]

33
start_network.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# --- CONFIGURATION ---
IP=${STATIC_IP:-"192.168.0.119/24"}
GW=${STATIC_GW:-"192.168.0.1"}
DNS=${STATIC_DNS:-"192.168.0.113"}
echo "--- Collabora Network Init ---"
echo "Using IP: $IP"
# 1. Generate Network Config (Debian/Ubuntu 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. Start Network
sleep 5
ifup eth0
# 4. Launch Collabora
echo "--- Starting Collabora ---"
# The official entrypoint script handles user switching automatically
# if we just execute it.
exec /start-collabora-online.sh