From 898a0f176aa01c81e55746611377d107ea31f6a3 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 25 Feb 2022 21:09:11 +0100 Subject: [PATCH] entrypoint.py: ensure parent directories exist Create the parent directores for the socket if they don't exist. --- containers/osbuild-composer/entrypoint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/containers/osbuild-composer/entrypoint.py b/containers/osbuild-composer/entrypoint.py index 521f596e7..c01b577a1 100644 --- a/containers/osbuild-composer/entrypoint.py +++ b/containers/osbuild-composer/entrypoint.py @@ -275,6 +275,7 @@ class Cli(contextlib.AbstractContextManager): else: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self._exitstack.enter_context(contextlib.closing(sock)) + os.makedirs("/run/osbuild-dnf-json/", exist_ok=True) sock.bind("/run/osbuild-dnf-json/api.sock") sock.listen()