diff --git a/Dockerfile b/build/linux-base-image/Dockerfile similarity index 94% rename from Dockerfile rename to build/linux-base-image/Dockerfile index 51fb87e..b8f7a02 100644 --- a/Dockerfile +++ b/build/linux-base-image/Dockerfile @@ -2,6 +2,7 @@ FROM debian:latest RUN apt update && apt --yes install openssh-server python3 sudo iproute2 iputils-ping traceroute vim && mkdir -p /root/.ssh/ && mkdir -p /run/sshd && rm -f /etc/ssh/ssh_host* RUN apt --yes install dnsmasq udhcpc less tcpdump RUN apt --yes install telnet netcat-openbsd wget curl man net-tools +RUN apt --yes install keychain # RUN apt install --yes nginx python3-pip # RUN pip3 install 'uvicorn[standard] fastapi' diff --git a/config/dnsmasq.conf b/config/dnsmasq.conf index 1eac972..299519b 100644 --- a/config/dnsmasq.conf +++ b/config/dnsmasq.conf @@ -1,3 +1,3 @@ interface=eth2 domain=sshworkshop.local -dhcp-range=set:workshop,192.168.0.10,192.168.0.200,12h +dhcp-range=set:workshop,192.168.0.1,192.168.0.200,36h diff --git a/helpers/csv2cards.sh b/helpers/csv2cards.sh index ac6ef4f..eb8941f 100644 --- a/helpers/csv2cards.sh +++ b/helpers/csv2cards.sh @@ -1,9 +1,11 @@ #!/usr/bin/env bash -# csv2cards.sh → html +# csv2cards.sh → html with guaranteed colour styling + CSV=${1:-credentials.csv} OUT=${2:-cards.html} -# start the document +# -------------------------------------------------------------- +# 1️⃣ Write the full HTML header (including the colour CSS) cat >"$OUT" <<'EOF' @@ -14,7 +16,7 @@ cat >"$OUT" <<'EOF' @page { size: A4 portrait; margin: 1cm; } body { font-family: monospace; display: flex; flex-wrap: wrap; gap: 0.5cm; } .card { - width: 9cm; /* fits 2‑3 cards across A4 */ + width: 9cm; border: 1px solid #333; padding: 0.3cm; box-sizing: border-box; @@ -22,14 +24,25 @@ cat >"$OUT" <<'EOF' } .field { margin: 0.1cm 0; } .label { font-weight: bold; } + + /* ---- 6‑colour palette (exactly as you requested) ---- */ + .bg0 { background:#eeff90; } /* light lime */ + .bg1 { background:#b9ffbf; } /* pastel green */ + .bg2 { background:#b6e1ff; } /* soft blue */ + .bg3 { background:#ffd795; } /* peach */ + .bg4 { background:#f0a6fc; } /* lavender */ + .bg5 { background:#f397a5; } /* coral */
EOF -# read CSV, skip header, emit a