portainer build fixed images

This commit is contained in:
2025-11-26 16:04:12 -08:00
parent 85888841db
commit 0b70204f8a
2 changed files with 41 additions and 43 deletions
+8 -10
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import json import json
import re
from pathlib import Path from pathlib import Path
# --------------------------------------------------------- # ---------------------------------------------------------
@@ -33,7 +34,6 @@ def extract_overview(readme_path: Path) -> str:
return " ".join(overview) return " ".join(overview)
# --------------------------------------------------------- # ---------------------------------------------------------
# Logo URL mapping # Logo URL mapping
# --------------------------------------------------------- # ---------------------------------------------------------
@@ -41,9 +41,9 @@ def find_logo_url(dir_path: Path) -> str:
name = dir_path.name name = dir_path.name
return f"https://i.4lt.ca/cookbook/{name}.png" return f"https://i.4lt.ca/cookbook/{name}.png"
# --------------------------------------------------------- # ---------------------------------------------------------
# Parse first image name from docker-compose.yml # Parse first image name from docker-compose.yml
# Handles Bash-style defaults like ${VAR:-default}
# --------------------------------------------------------- # ---------------------------------------------------------
def parse_image(compose_path: Path) -> str: def parse_image(compose_path: Path) -> str:
if not compose_path.exists(): if not compose_path.exists():
@@ -51,12 +51,14 @@ def parse_image(compose_path: Path) -> str:
for line in compose_path.read_text().splitlines(): for line in compose_path.read_text().splitlines():
if "image:" in line: if "image:" in line:
# strip inline quotes and whitespace image = line.split("image:", 1)[1].strip().strip('"').strip("'")
parts = line.split("image:") # Handle Bash-style ${VAR:-default} -> default
image = parts[1].strip().strip('"').strip("'") match = re.match(r"\$\{[^:]+:-([^}]+)\}", image)
if match:
image = match.group(1)
return image return image
return ""
return ""
# --------------------------------------------------------- # ---------------------------------------------------------
# Parse environment variables from sample.env or env-sample # Parse environment variables from sample.env or env-sample
@@ -84,7 +86,6 @@ def parse_env_vars(dir_path: Path):
return env_list return env_list
# --------------------------------------------------------- # ---------------------------------------------------------
# Build template object for a stack directory # Build template object for a stack directory
# --------------------------------------------------------- # ---------------------------------------------------------
@@ -122,8 +123,6 @@ def generate_template_object(dir_path: Path):
"env": env_entries "env": env_entries
} }
# --------------------------------------------------------- # ---------------------------------------------------------
# Main script logic # Main script logic
# --------------------------------------------------------- # ---------------------------------------------------------
@@ -143,6 +142,5 @@ def main():
OUTPUT_FILE.write_text(json.dumps(templates, indent=2)) OUTPUT_FILE.write_text(json.dumps(templates, indent=2))
print(f"Generated {OUTPUT_FILE} with templates for Docker Compose stacks.") print(f"Generated {OUTPUT_FILE} with templates for Docker Compose stacks.")
if __name__ == "__main__": if __name__ == "__main__":
main() main()
+33 -33
View File
@@ -9,7 +9,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/phpcontainer.png", "logo": "https://i.4lt.ca/cookbook/phpcontainer.png",
"image": "${PHPCONTAINER_IMAGE:-4lights/phpcontainer:latest}", "image": "4lights/phpcontainer:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "phpcontainer/docker-compose.yml", "stackfile": "phpcontainer/docker-compose.yml",
@@ -58,7 +58,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/wallabag.png", "logo": "https://i.4lt.ca/cookbook/wallabag.png",
"image": "${WALLABAG_IMAGE:-wallabag/wallabag:latest}", "image": "wallabag/wallabag:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "wallabag/docker-compose.yml", "stackfile": "wallabag/docker-compose.yml",
@@ -157,7 +157,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/thunderbird.png", "logo": "https://i.4lt.ca/cookbook/thunderbird.png",
"image": "${THUNDERBIRD_IMAGE:-jlesage/thunderbird}", "image": "jlesage/thunderbird",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "thunderbird/docker-compose.yml", "stackfile": "thunderbird/docker-compose.yml",
@@ -201,7 +201,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/mariadb.png", "logo": "https://i.4lt.ca/cookbook/mariadb.png",
"image": "${MARIADB_IMAGE:-mariadb:latest}", "image": "mariadb:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "mariadb/docker-compose.yml", "stackfile": "mariadb/docker-compose.yml",
@@ -373,7 +373,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/phpmyadmin.png", "logo": "https://i.4lt.ca/cookbook/phpmyadmin.png",
"image": "${PHPMYADMIN_IMAGE:-phpmyadmin/phpmyadmin:latest}", "image": "phpmyadmin/phpmyadmin:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "phpmyadmin/docker-compose.yml", "stackfile": "phpmyadmin/docker-compose.yml",
@@ -630,7 +630,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/nocodb.png", "logo": "https://i.4lt.ca/cookbook/nocodb.png",
"image": "${NOCODB_IMAGE:-nocodb/nocodb:latest}", "image": "nocodb/nocodb:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "nocodb/docker-compose.yml", "stackfile": "nocodb/docker-compose.yml",
@@ -837,7 +837,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/n8n.png", "logo": "https://i.4lt.ca/cookbook/n8n.png",
"image": "${N8N_IMAGE:-n8nio/n8n:latest}", "image": "n8nio/n8n:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "n8n/docker-compose.yml", "stackfile": "n8n/docker-compose.yml",
@@ -933,7 +933,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/mealie.png", "logo": "https://i.4lt.ca/cookbook/mealie.png",
"image": "${MEALIE_IMAGE:-hkotel/mealie:latest}", "image": "hkotel/mealie:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "mealie/docker-compose.yml", "stackfile": "mealie/docker-compose.yml",
@@ -1040,7 +1040,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/redis.png", "logo": "https://i.4lt.ca/cookbook/redis.png",
"image": "${REDIS_IMAGE:-redis:alpine}", "image": "redis:alpine",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "redis/docker-compose.yml", "stackfile": "redis/docker-compose.yml",
@@ -1069,7 +1069,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/duplicati.png", "logo": "https://i.4lt.ca/cookbook/duplicati.png",
"image": "${DUPLICATI_IMAGE:-duplicati/duplicati:latest}", "image": "duplicati/duplicati:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "duplicati/docker-compose.yml", "stackfile": "duplicati/docker-compose.yml",
@@ -1113,7 +1113,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/qbittorrent.png", "logo": "https://i.4lt.ca/cookbook/qbittorrent.png",
"image": "${QBT_IMAGE:-trigus42/qbittorrentvpn:latest}", "image": "trigus42/qbittorrentvpn:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "qbittorrent/docker-compose.yml", "stackfile": "qbittorrent/docker-compose.yml",
@@ -1186,7 +1186,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/monica.png", "logo": "https://i.4lt.ca/cookbook/monica.png",
"image": "${MONICA_IMAGE:-latest}", "image": "latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "monica/docker-compose.yml", "stackfile": "monica/docker-compose.yml",
@@ -1297,7 +1297,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/lubelogger.png", "logo": "https://i.4lt.ca/cookbook/lubelogger.png",
"image": "${LUBELOGR_IMAGE_NAME:-ghcr.io/hargata/lubelogger:latest}", "image": "ghcr.io/hargata/lubelogger:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "lubelogger/docker-compose.yml", "stackfile": "lubelogger/docker-compose.yml",
@@ -1331,7 +1331,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/code-server.png", "logo": "https://i.4lt.ca/cookbook/code-server.png",
"image": "${CODE-SERVER_IMAGE:-null}", "image": "null",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "code-server/docker-compose.yml", "stackfile": "code-server/docker-compose.yml",
@@ -1398,7 +1398,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/handbrake.png", "logo": "https://i.4lt.ca/cookbook/handbrake.png",
"image": "${HANDBRAKE_IMAGE:-jlesage/handbrake:latest}", "image": "jlesage/handbrake:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "handbrake/docker-compose.yml", "stackfile": "handbrake/docker-compose.yml",
@@ -1546,7 +1546,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/paisa.png", "logo": "https://i.4lt.ca/cookbook/paisa.png",
"image": "${PAISA_IMAGE:-ananthakumaran/paisa:latest}", "image": "ananthakumaran/paisa:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "paisa/docker-compose.yml", "stackfile": "paisa/docker-compose.yml",
@@ -1580,7 +1580,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/semaphore.png", "logo": "https://i.4lt.ca/cookbook/semaphore.png",
"image": "${SEMAPHORE_IMAGE:-semaphoreui/semaphore:latest}", "image": "semaphoreui/semaphore:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "semaphore/docker-compose.yml", "stackfile": "semaphore/docker-compose.yml",
@@ -1649,7 +1649,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/uptimekuma.png", "logo": "https://i.4lt.ca/cookbook/uptimekuma.png",
"image": "${UPTIMEKUMA_IMAGE:-louislam/uptime-kuma:latest}", "image": "louislam/uptime-kuma:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "uptimekuma/docker-compose.yml", "stackfile": "uptimekuma/docker-compose.yml",
@@ -1786,7 +1786,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/homepage.png", "logo": "https://i.4lt.ca/cookbook/homepage.png",
"image": "${HOMEPAGE_IMAGE:-ghcr.io/gethomepage/homepage:latest}", "image": "ghcr.io/gethomepage/homepage:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "homepage/docker-compose.yml", "stackfile": "homepage/docker-compose.yml",
@@ -1820,7 +1820,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/piwigo.png", "logo": "https://i.4lt.ca/cookbook/piwigo.png",
"image": "${PIWIGO_IMAGE:-lscr.io/linuxserver/piwigo:latest}", "image": "lscr.io/linuxserver/piwigo:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "piwigo/docker-compose.yml", "stackfile": "piwigo/docker-compose.yml",
@@ -1869,7 +1869,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/portainer.png", "logo": "https://i.4lt.ca/cookbook/portainer.png",
"image": "${PORTAINER_IMAGE:-portainer/portainer-ce:latest}", "image": "portainer/portainer-ce:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "portainer/docker-compose.yml", "stackfile": "portainer/docker-compose.yml",
@@ -2057,7 +2057,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/filebrowser.png", "logo": "https://i.4lt.ca/cookbook/filebrowser.png",
"image": "${FILEBROWSER_IMAGE:-gtstef/filebrowser:latest}", "image": "gtstef/filebrowser:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "filebrowser/docker-compose.yml", "stackfile": "filebrowser/docker-compose.yml",
@@ -2106,7 +2106,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/firefly.png", "logo": "https://i.4lt.ca/cookbook/firefly.png",
"image": "${FIREFLY_IMAGE:-fireflyiii/core:latest}", "image": "fireflyiii/core:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "firefly/docker-compose.yml", "stackfile": "firefly/docker-compose.yml",
@@ -2145,7 +2145,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/jellyfin.png", "logo": "https://i.4lt.ca/cookbook/jellyfin.png",
"image": "${JELLYFIN_IMAGE:-jellyfin/jellyfin:latest}", "image": "jellyfin/jellyfin:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "jellyfin/docker-compose.yml", "stackfile": "jellyfin/docker-compose.yml",
@@ -2202,7 +2202,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/minio.png", "logo": "https://i.4lt.ca/cookbook/minio.png",
"image": "${MINIO_IMAGE:-quay.io/minio/minio}", "image": "quay.io/minio/minio",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "minio/docker-compose.yml", "stackfile": "minio/docker-compose.yml",
@@ -2261,7 +2261,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/vaultwarden.png", "logo": "https://i.4lt.ca/cookbook/vaultwarden.png",
"image": "${VAULT_IMAGE:-vaultwarden/server:latest}", "image": "vaultwarden/server:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "vaultwarden/docker-compose.yml", "stackfile": "vaultwarden/docker-compose.yml",
@@ -2429,7 +2429,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/nginx-proxy-manager.png", "logo": "https://i.4lt.ca/cookbook/nginx-proxy-manager.png",
"image": "${PROXY_IMAGE:-jc21/nginx-proxy-manager:latest}", "image": "jc21/nginx-proxy-manager:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "nginx-proxy-manager/docker-compose.yml", "stackfile": "nginx-proxy-manager/docker-compose.yml",
@@ -2481,7 +2481,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/bookstack.png", "logo": "https://i.4lt.ca/cookbook/bookstack.png",
"image": "${BOOKSTACK_IMAGE:-solidnerd/bookstack:latest}", "image": "solidnerd/bookstack:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "bookstack/docker-compose.yml", "stackfile": "bookstack/docker-compose.yml",
@@ -2560,7 +2560,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/gitea.png", "logo": "https://i.4lt.ca/cookbook/gitea.png",
"image": "${GITEA_IMAGE:-gitea/gitea:latest}", "image": "gitea/gitea:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "gitea/docker-compose.yml", "stackfile": "gitea/docker-compose.yml",
@@ -2648,7 +2648,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/ntfy.png", "logo": "https://i.4lt.ca/cookbook/ntfy.png",
"image": "${NTFY_IMAGE:-binwiederhier/ntfy}", "image": "binwiederhier/ntfy",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "ntfy/docker-compose.yml", "stackfile": "ntfy/docker-compose.yml",
@@ -3105,7 +3105,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/stashapp.png", "logo": "https://i.4lt.ca/cookbook/stashapp.png",
"image": "${STASHAPP_IMAGE:-stashapp/stash:latest}", "image": "stashapp/stash:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "stashapp/docker-compose.yml", "stackfile": "stashapp/docker-compose.yml",
@@ -3154,7 +3154,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/archivebox.png", "logo": "https://i.4lt.ca/cookbook/archivebox.png",
"image": "${ARCHIVEBOX_IMAGE:-archivebox/archivebox:stable}", "image": "archivebox/archivebox:stable",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "archivebox/docker-compose.yml", "stackfile": "archivebox/docker-compose.yml",
@@ -3232,7 +3232,7 @@
], ],
"platform": "linux", "platform": "linux",
"logo": "https://i.4lt.ca/cookbook/nextcloud.png", "logo": "https://i.4lt.ca/cookbook/nextcloud.png",
"image": "${NEXTCLOUD_IMAGE:-nextcloud:latest}", "image": "nextcloud:latest",
"repository": { "repository": {
"url": "https://github.com/nickyeoman/docker-compose-cookbooks", "url": "https://github.com/nickyeoman/docker-compose-cookbooks",
"stackfile": "nextcloud/docker-compose.yml", "stackfile": "nextcloud/docker-compose.yml",