This repository was archived by the owner on Apr 5, 2026. It is now read-only.
Description Problem
Our Docker image uses Ubuntu 22.04 as runtime base, resulting in ~150MB+ images. Competing implementations are much smaller:
Proxy
Base Image
Size
mtg
scratch (static Go binary)
~20 MB
telemt
distroless + UPX
~30 MB
Ours
Ubuntu 22.04 + runtime deps
~150+ MB
Current Runtime Dependencies
RUN apt-get install -y libssl3 zlib1g curl ca-certificates vim-common cron iproute2
libssl3, zlib1g — required for the binary
curl — for downloading proxy-multi.conf and external IP detection
vim-common — only for xxd (secret generation)
cron — for 6-hourly config refresh
iproute2 — for ip route (local IP detection)
Proposed Approach
Option A: Alpine Linux (~30MB)
FROM alpine:3.21
RUN apk add --no-cache openssl zlib curl ca-certificates
Replace cron with Alpine's crond (from busybox, already included)
Replace xxd with od or openssl rand -hex 16
Replace iproute2 with Alpine's ip from busybox
Option B: Static linking + scratch/distroless
Statically link OpenSSL and zlib at build time
Use multi-stage build with scratch base
Ship curl as a separate static binary or use a lightweight HTTP client
Most complex but smallest result
Option C: Debian slim (~50MB)
FROM debian:bookworm-slim
Simplest migration, moderate size reduction
All packages available without rebuilding
Recommendation
Option A (Alpine) offers the best balance of size reduction and compatibility.
Reactions are currently unavailable
Problem
Our Docker image uses Ubuntu 22.04 as runtime base, resulting in ~150MB+ images. Competing implementations are much smaller:
scratch(static Go binary)distroless+ UPXCurrent Runtime Dependencies
RUN apt-get install -y libssl3 zlib1g curl ca-certificates vim-common cron iproute2libssl3,zlib1g— required for the binarycurl— for downloading proxy-multi.conf and external IP detectionvim-common— only forxxd(secret generation)cron— for 6-hourly config refreshiproute2— forip route(local IP detection)Proposed Approach
Option A: Alpine Linux (~30MB)
cronwith Alpine'scrond(from busybox, already included)xxdwithodoropenssl rand -hex 16iproute2with Alpine'sipfrom busyboxOption B: Static linking + scratch/distroless
scratchbasecurlas a separate static binary or use a lightweight HTTP clientOption C: Debian slim (~50MB)
FROM debian:bookworm-slimRecommendation
Option A (Alpine) offers the best balance of size reduction and compatibility.