quiet-helmet-40109
07/10/2023, 2:25 PMstat cannot find Dockerfile: No such directory or folder
This is our code:
export const myImage = new docker.Image(
myAppImageName,
{
imageName: pulumi.interpolate`${region}-docker.pkg.dev/${artifactRegistry.project}/${artifactRegistry.repositoryId}/${myAppImageName}`,
build: {
args: imageArgs,
platform: "linux/amd64",
context: "../",
dockerfile: "../Dockerfile.gcp_web",
},
},
{ dependsOn: [artifactRegistry, elastic.instance] }
);
Any ideas?
docker build .. -f ../Dockerfile.gcp_web
<---- this is working just fine in the same directoryprehistoric-activity-61023
07/10/2023, 2:31 PMtree
in the command line 🙂docker
package but I have a strange feeling that using ../
might be not allowed 🤔pulumi up
• the actual file containing the rel pathquiet-helmet-40109
07/10/2023, 2:40 PMpulumi up
command inside ops
folder.
So that’s why we are using ../
as context and ../DockerFile
as it’s actually the relative path (one up from ops, where we run the command)
we already tried with one more directory but it didn’t work. (Expecting to use resources as the current path from pulumi)
We also logged the __dirname
and pwd
and everything points to ops
folder, where we are standing.prehistoric-activity-61023
07/10/2023, 2:43 PMops
folder, change the code accordingly and run pulumi up
again to see if the error persists?quiet-helmet-40109
07/10/2023, 2:48 PMprehistoric-activity-61023
07/10/2023, 2:49 PM