Thread
#automation-api
    m

    miniature-leather-70472

    1 month ago
    I'm looking to run a dotnet C# pulumi program in a docker conatainer using the automation API. As far as I can tell I need to have the .net SDK installed, rather than just the run time to do this, as Pulumi compiles the program at run time, is this correct? Is there anyway to pre-compile the program at container creation time to help reduce the size?
    b

    bored-oyster-3147

    1 month ago
    yes you can pre-compile for both Golang and .NET and provide the path to your pre-built binary in your project settings
    And Java now, apparently. See here: https://www.pulumi.com/docs/reference/pulumi-yaml/ Under
    runtime:options
    m

    miniature-leather-70472

    1 month ago
    Awesome, thanks for that, will give that a go
    w

    worried-city-86458

    1 month ago
    That's what I do in https://github.com/gitfool/Pulumi.Dungeon/blob/main/Cli/Dockerfile (derives from dotnet/runtime-deps since it builds a single file executable)
    l

    little-cartoon-10569

    1 month ago
    If you're looking to use images, Pulumi publishes lang-specific ones on Docker Hub.
    Looks like this is the one you want: https://hub.docker.com/r/pulumi/pulumi-dotnet
    b

    bored-oyster-3147

    1 month ago
    @little-cartoon-10569 I believe the pulumi .NET container contains the full SDK and not just the runtime
    w

    worried-city-86458

    1 month ago
    You probably want to build your own image, so use these as starting points.
    l

    little-cartoon-10569

    1 month ago
    The base image doesn't include the SDK.
    w

    worried-city-86458

    1 month ago
    Also, you don't need the dotnet plugin when using the automation api. (I only extract the pulumi executable.)