Skip to content

Commit 1acebf5

Browse files
z4nr34lclaude
andcommitted
fix(traefik): make all config files writable by non-root user
Install.sh runs as root but traefik-start runs as vscode. All config files now get chmod 666 at build time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 04fa487 commit 1acebf5

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/traefik/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "traefik",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"name": "Traefik Reverse Proxy",
55
"description": "Traefik reverse proxy with subdomain routing to local services",
66
"documentationURL": "https://doc.traefik.io/traefik/",

src/traefik/install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ chmod 777 "$CONFIG_DIR"
1515
echo "http:" > "$CONFIG_DIR/dynamic.yml"
1616
chmod 666 "$CONFIG_DIR/dynamic.yml"
1717

18+
# Ensure all config files are writable by non-root (traefik-start runs as vscode)
19+
1820
# ── Save feature options for runtime use ─────────────────────────────────────
1921
cat > "$CONFIG_DIR/feature.env" <<ENV
2022
DEFAULT_DOMAIN="${DOMAIN}"
2123
ROUTES="${ROUTES}"
2224
DEFAULTAPP="${DEFAULTAPP}"
2325
ENV
26+
chmod 666 "$CONFIG_DIR/feature.env"
2427

2528
# ── Static config (traefik.yml) ──────────────────────────────────────────────
2629
cat > "$CONFIG_DIR/traefik.yml" <<'YAML'
@@ -40,6 +43,7 @@ providers:
4043
filename: /etc/traefik/dynamic.yml
4144
watch: true
4245
YAML
46+
chmod 666 "$CONFIG_DIR/traefik.yml"
4347

4448
# ── Docker Compose ───────────────────────────────────────────────────────────
4549
cat > "$CONFIG_DIR/docker-compose.yml" <<YAML
@@ -57,6 +61,7 @@ services:
5761
- ${CONFIG_DIR}/traefik.yml:/etc/traefik/traefik.yml:ro
5862
- ${CONFIG_DIR}/dynamic.yml:/etc/traefik/dynamic.yml:ro
5963
YAML
64+
chmod 666 "$CONFIG_DIR/docker-compose.yml"
6065

6166
# ── Start script (generates dynamic.yml at runtime) ─────────────────────────
6267
cat > /usr/local/bin/traefik-start <<'SCRIPT'

0 commit comments

Comments
 (0)