DEVX-23: fix: use tempfile for dockerd log to fix CI permission error
Post-merge / detect-type (push) Successful in 15s
Post-merge / validate-commit-msg (push) Successful in 13s
Post-merge / configure-repo (push) Successful in 14s
Post-merge / release (push) Successful in 40s
Post-merge / vikunja (push) Successful in 22s
Post-merge / sync-wiki (push) Successful in 42s
Post-merge / badges (push) Successful in 54s

This commit was merged in pull request #38.
This commit is contained in:
2026-06-24 00:45:28 +00:00
parent 011cf3e093
commit 16fba17b03
3 changed files with 18 additions and 12 deletions
+4 -2
View File
@@ -15,6 +15,7 @@ from __future__ import annotations
import subprocess # nosec B404
import sys
import tempfile
import time
import click
@@ -22,7 +23,6 @@ import click
from devx.i18n import _
DEFAULT_TIMEOUT = 30
DOCKERD_LOG = "/var/log/dockerd.log"
def is_docker_ready() -> bool:
@@ -46,7 +46,9 @@ def start_docker_daemon(timeout: int = DEFAULT_TIMEOUT) -> bool:
start within the timeout.
"""
click.echo(_("Starting Docker daemon..."))
log_file = open(DOCKERD_LOG, "w") # noqa: SIM115
log_file = tempfile.NamedTemporaryFile( # noqa: SIM115
mode="w", suffix="dockerd.log", delete=False
)
subprocess.Popen( # nosec B603 B607
["dockerd", "--storage-driver", "vfs"],
stdout=log_file,