From 42dfabd825d0b93d72e462a06bf04449fc93926a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Ramon=20Ma=C3=B1es?= <32740567+jrmanes@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:53:05 +0200 Subject: [PATCH] fix(knuu): creates context folder (#266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jose Ramon MaƱes --- pkg/container/docker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/container/docker.go b/pkg/container/docker.go index f8756fb..a97c73b 100644 --- a/pkg/container/docker.go +++ b/pkg/container/docker.go @@ -41,6 +41,10 @@ func NewBuilderFactory(imageName, buildContext string, imageBuilder builder.Buil if err != nil { return nil, fmt.Errorf("failed to create docker client: %w", err) } + err = os.MkdirAll(buildContext, 0755) + if err != nil { + return nil, fmt.Errorf("failed to create context directory: %w", err) + } return &BuilderFactory{ imageNameFrom: imageName, cli: cli,