You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building an image, I would like the ability pass the content of a Dockerfile directly to the Image constructor, rather than having to reference an external context. e.g.:
import{Image}from"@pulumi/docker";constimageName='trial-image';constbase='ghost';constexposedPort=2368;constlocalPort=8080;constbuildingMessage='building a container...';constimage=newImage(imageName,{
imageName,build: {context: `.`,dockerfileContent: ` FROM ${base} RUN echo '${buildingMessage}' EXPOSE ${exposedPort}`},skipPush: true},{});
Affected feature
It seems plausible to modify the DockerBuild interface within "sdk/nodejs/docker.ts" and to modify dockerBuild to pass content as the stdin parameter to runCommandThatMustSucceed* when appropriate.
I've also included updates for python, c#, and go; but I am not an expert with these languages an am unclear how to run and test them with my local branch.
The text was updated successfully, but these errors were encountered:
Hi @johnhenry, we just released a new Docker Build provider focused exclusively on building images with buildx/BuildKit. It provides support for inline Dockerfiles out of the box, and we recommend you use it for building images going forward. Please take a look and give us feedback!
The repository is here; our blog announcement is here; and finally API docs are here along with examples of how to migrate your existing Image resources to dockerbuild.Image.
We won't be able to add this functionality in this provider for a number of reasons, so I'm closing this as wont-fix.
When building an image, I would like the ability pass the content of a Dockerfile directly to the Image constructor, rather than having to reference an external context. e.g.:
Affected feature
It seems plausible to modify the DockerBuild interface within "sdk/nodejs/docker.ts" and to modify dockerBuild to pass content as the stdin parameter to runCommandThatMustSucceed* when appropriate.
I'm working on a branch here: https://github.com/johnhenry/pulumi-docker/tree/johnhenry/dockerfile-content, which seems to work for typescript, but i'm unclear on how to write tests that will be accepted for this project.
I've also included updates for python, c#, and go; but I am not an expert with these languages an am unclear how to run and test them with my local branch.
The text was updated successfully, but these errors were encountered: