Build local containers for k8s services (#61)
## Summary - Move devpi Dockerfile from argocd/manifests to containers/devpi/ - Add containers for: transmission, teslamate, miniflux, kiwix-serve, kubectl - Update all k8s deployments to use local images (registry.ops.eblu.me/blumeops/*) - All containers use v1.0.0 tag for initial release ## Containers Added | Container | Source | Notes | |-----------|--------|-------| | devpi | python:3.12-slim | Existing, moved to containers/ | | kubectl | alpine + download | For zim-watcher CronJob | | miniflux | Go build from source | v2.2.16 | | kiwix-serve | Download pre-built binary | v3.8.1 | | transmission | alpine + apk install | Simpler than linuxserver image | | teslamate | Elixir build from source | v2.2.0 | ## Deployment and Testing - [ ] Build and tag devpi-v1.0.0 - [ ] Build and tag kubectl-v1.0.0 - [ ] Build and tag miniflux-v1.0.0 - [ ] Build and tag kiwix-serve-v1.0.0 - [ ] Build and tag transmission-v1.0.0 - [ ] Build and tag teslamate-v1.0.0 - [ ] Sync ArgoCD apps and verify services 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/61
This commit is contained in:
parent
ea42362b6f
commit
c8b655f177
15 changed files with 306 additions and 9 deletions
27
containers/transmission/Dockerfile
Normal file
27
containers/transmission/Dockerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Transmission BitTorrent daemon
|
||||
# Simpler alternative to linuxserver image
|
||||
|
||||
FROM alpine:3.21
|
||||
|
||||
ARG TRANSMISSION_VERSION=4.0.6-r0
|
||||
|
||||
RUN apk add --no-cache \
|
||||
transmission-daemon=${TRANSMISSION_VERSION} \
|
||||
transmission-cli=${TRANSMISSION_VERSION} \
|
||||
transmission-remote=${TRANSMISSION_VERSION} \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
su-exec
|
||||
|
||||
# Create directories (user is created dynamically by start.sh based on PUID/PGID)
|
||||
RUN mkdir -p /config /downloads/complete /downloads/incomplete
|
||||
|
||||
COPY start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
EXPOSE 9091 51413/tcp 51413/udp
|
||||
|
||||
VOLUME ["/config", "/downloads"]
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
57
containers/transmission/start.sh
Normal file
57
containers/transmission/start.sh
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Handle PUID/PGID like linuxserver images
|
||||
PUID=${PUID:-1000}
|
||||
PGID=${PGID:-1000}
|
||||
|
||||
# Create or update transmission group/user with requested UID/GID
|
||||
# The transmission package may have created a user with different IDs
|
||||
echo "Setting up transmission user with UID=$PUID GID=$PGID"
|
||||
|
||||
# Remove existing user/group if they exist (ignore errors)
|
||||
deluser transmission 2>/dev/null || true
|
||||
delgroup transmission 2>/dev/null || true
|
||||
|
||||
# Create fresh user/group with requested IDs
|
||||
addgroup -g "$PGID" transmission
|
||||
adduser -D -u "$PUID" -G transmission transmission
|
||||
|
||||
# Ensure directories exist with correct ownership
|
||||
mkdir -p /config /downloads/complete /downloads/incomplete
|
||||
# Only chown /config (emptyDir) - /downloads is NFS and may not allow chown
|
||||
chown -R transmission:transmission /config 2>/dev/null || true
|
||||
chown transmission:transmission /downloads /downloads/complete /downloads/incomplete 2>/dev/null || true
|
||||
|
||||
# Create default config if it doesn't exist
|
||||
CONFIG_FILE="/config/settings.json"
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
echo "Creating default configuration..."
|
||||
cat > "$CONFIG_FILE" << 'EOF'
|
||||
{
|
||||
"download-dir": "/downloads/complete",
|
||||
"incomplete-dir": "/downloads/incomplete",
|
||||
"incomplete-dir-enabled": true,
|
||||
"rpc-enabled": true,
|
||||
"rpc-bind-address": "0.0.0.0",
|
||||
"rpc-port": 9091,
|
||||
"rpc-whitelist-enabled": false,
|
||||
"rpc-host-whitelist-enabled": false,
|
||||
"peer-port": 51413,
|
||||
"watch-dir-enabled": false,
|
||||
"umask": 2
|
||||
}
|
||||
EOF
|
||||
chown transmission:transmission "$CONFIG_FILE"
|
||||
fi
|
||||
|
||||
# Set timezone
|
||||
if [ -n "$TZ" ]; then
|
||||
ln -sf "/usr/share/zoneinfo/$TZ" /etc/localtime
|
||||
fi
|
||||
|
||||
echo "Starting transmission-daemon..."
|
||||
exec su-exec transmission transmission-daemon \
|
||||
--foreground \
|
||||
--config-dir /config \
|
||||
--log-level=info
|
||||
Loading…
Add table
Add a link
Reference in a new issue