lemon-greece-30910
02/25/2019, 11:05 PMDockerfile
with awsx.ecs.Image.fromPath
as show in the example on https://pulumi.io/quickstart/aws/tutorial-service.html ... i would like something similar so i can build an image for kubernetes to work on an example like shown at: https://github.com/pulumi/examples/tree/master/kubernetes-ts-exposed-deployment.
i have tried searching the documentation but i am unable to find what i am looking for. perhaps i am searching in the wrong place?creamy-potato-29402
02/25/2019, 11:06 PMlemon-greece-30910
02/25/2019, 11:07 PMcreamy-potato-29402
02/25/2019, 11:09 PMmyDeployment.mountFile
vs creating a ConfigMap
and adding it to a volume list.white-balloon-205
awsx.ecs.Image.fromPath
is just a wrapper that creates an ECR
repository and builds and pushes a local Docker image to it. Effectively it just wraps these lines into a nice function: https://github.com/pulumi/pulumi-docker/blob/master/examples/aws/index.ts#L18-L45
You can use this as-is with Kubernetes if you want - or you can write similar code to work with whatever other registry you want to push to - DockerHub, GCR, ACR, or something you are self-hosting in your cluster - using @pulumi/docker
directly.
You should not need any kubernetesx
like thing for this (and in fact, because Kubernetes itself doesn't have any built-in registry, it's not immediately clear that a fromImage
will be part of such a library).lemon-greece-30910
02/26/2019, 10:18 PMimage: awsx.ecs.Image.fromPath("caddy", {
dockerfile: "./src"
}),
unlike in the example on the pulumi website (which i guess is incorrect?), it seems fromPath
in the latest version (0.16.5) requires 2 parameters. but i cant figure out how the second parameter needs to be specified. it would help if i could get an example.