https://pulumi.com logo
#general
Title
# general
r

rich-alligator-53421

09/14/2023, 10:29 AM
Enabling cacheFrom results in error "error: could not open dockerfile at relative path Dockerfile: stat Dockerfile: no such file or directory" Heres my code. (for clarification, the cache is commented out, and works like that) const registry = new gcp.container.Registry("image-registry", {}, { retainOnDelete: true }); const registryUrl = registry.id.apply(_ => gcp.container.getRegistryRepository().then(reg => reg.repositoryUrl)); const imageName = registryUrl.apply(url =>
${url}/cloud-run-test-image
); const image = new docker.Image("cloud-run-test-image", { build: { context: "cloud-run-test/", dockerfile: "cloud-run-test/Dockerfile", args: { "BUILDKIT_INLINE_CACHE": "1" }, builderVersion: "BuilderBuildKit", //cacheFrom: { // images: [imageName] //}, platform: "linux/amd64", }, imageName: pulumi.interpolate`${imageName}`, }, { retainOnDelete: true });
d

dry-keyboard-94795

09/14/2023, 10:39 AM
Does it work if you remove
cloud-run-test
from
dockerfile
? It's supposed to be relative to the context
r

rich-alligator-53421

09/14/2023, 10:50 AM
Nope, doesn't help, just says " error: could not open dockerfile at relative path Dockerfile. Try setting
dockerfile
to "cloud-run-test/Dockerfile""