https://pulumi.com logo
Title
p

plain-potato-84679

01/04/2022, 10:16 AM
Hi, I'm stuck with an error message, when trying to build a docker image. After it didn't work with my custom Dockerfile, I tried with the example from the pulumi repo (https://github.com/pulumi/pulumi-docker/tree/master/examples/dockerfile-py), but with no luck either. This is the error message I'm seeing:
error: Program failed with an unhandled exception:
    error: Traceback (most recent call last):
      File "C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin\pulumi-language-python-exec", line 107, in <module>
        loop.run_until_complete(coro)
      File "C:\Users\user\Anaconda3\lib\asyncio\base_events.py", line 587, in run_until_complete
        return future.result()
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi\runtime\stack.py", line 110, in run_in_stack
        await run_pulumi_func(lambda: Stack(func))
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi\runtime\stack.py", line 45, in run_pulumi_func
        await wait_for_rpcs()
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi\runtime\stack.py", line 94, in wait_for_rpcs
        raise exception
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi\output.py", line 161, in run
        value = await self._future
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi\output.py", line 161, in run
        value = await self._future
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi\output.py", line 182, in run
        transformed: Input[U] = func(value)
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\image.py", line 254, in <lambda>
        lambda args: get_image_data(_ImageArgs(*args))
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\image.py", line 237, in get_image_data
        image_args.skip_push,
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\docker.py", line 243, in build_and_push_image       
        build_result = build_image(base_image_name, path_or_build, log_resource, cache_from)
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\docker.py", line 437, in build_image
        docker_build(image_name, build, log_resource, cache_from)
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\docker.py", line 491, in docker_build
        return run_command_that_must_succeed("docker", build_args, log_resource, env=build.env)
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\docker.py", line 599, in run_command_that_must_succeed
        cmd, args, log_resource, report_full_command_line, False, stdin, env)
      File "C:\Users\user\OneDrive - MZ KG\Work\__Projekte\Python\pulumi_infrastructure\gcp_vm_dagster\venv\lib\site-packages\pulumi_docker\docker.py", line 661, in run_command_that_can_fail  
        stderr=subprocess.PIPE, stdin=subprocess.PIPE, encoding="utf-8")
      File "C:\Users\user\Anaconda3\lib\subprocess.py", line 800, in __init__
        restore_signals, start_new_session)
      File "C:\Users\user\Anaconda3\lib\subprocess.py", line 1207, in _execute_child
        startupinfo)
    FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
    error: an unhandled error occurred: Program exited with non-zero exit code: 1
I can't make much of the output. Maybe you have an idea?
b

billowy-army-68599

01/04/2022, 3:51 PM
it looks like the issue is it can't find the
Dockerfile
, did you try setting it explicitly?