dazzling-activity-89210
09/04/2024, 10:12 PMlittle-cartoon-10569
09/04/2024, 10:46 PMdazzling-activity-89210
09/04/2024, 10:47 PMlittle-cartoon-10569
09/04/2024, 10:58 PMdazzling-activity-89210
09/04/2024, 10:58 PMdazzling-activity-89210
09/04/2024, 10:58 PMconst baseImage = new dockerbuild.Image("BaseImage", {
context: { location: "../../" },
dockerfile: { location: "../../Dockerfile" },
tags: [`test:latest`],
cacheTo: [
{ local: { dest: "../../.build-cache", mode: dockerbuild.CacheMode.Min } },
],
cacheFrom: [{ local: { src: "../../.build-cache" } }],
push: false,
noCache: false,
});
1. tags don't name the docker image. it names the image moby/buildkit
2. you can't name the docker build itself. names it my github repo link
3. caching doesn't work completely. it builds up to a certain point: COPY . .
and then it does the full build afterwards
If i run everything through the cli it works though:
docker buildx build . --tag test:latest -f ./Dockerfile --cache-to type=local,dest=.build-cache --cache-from type=local,src=.build-cache --builder clever_morse
little-cartoon-10569
09/04/2024, 11:03 PM../..
is a very strange path to choose. Your Pulumi project is nested two levels down from your Dockerfile? Could there be a problem with that, because something (I don't know what, a temp file maybe) is being written into a directory inside the context, while the image is being created?dazzling-activity-89210
09/04/2024, 11:06 PMlittle-cartoon-10569
09/04/2024, 11:08 PMdazzling-activity-89210
09/04/2024, 11:10 PMlittle-cartoon-10569
09/04/2024, 11:11 PM.
and docker file ./Dockerfile
. In your code, you're using ../../
and ../../Dockerfile
. That's a difference that worth eliminating, at least to test.dazzling-activity-89210
09/05/2024, 4:30 AMdazzling-activity-89210
09/05/2024, 4:30 AMdazzling-activity-89210
09/05/2024, 5:15 AMdazzling-activity-89210
09/05/2024, 5:23 AM