This message was deleted.
# general
s
This message was deleted.
q
If there's another way to optimise the workflow that would be an option too.
My deployment takes the output of the image
new image, results in new deployment
Don't believe this is of any consequence but it's running in circle-ci
Running the docker build locally repeatedly the same sha is calculated
Copy code
xxxx> docker build . --tag test
[+] Building 0.4s (17/17) FINISHED
 => [internal] load build definition from Dockerfile                                            
 => => transferring dockerfile: 32B                                                             
 => [internal] load .dockerignore                                                               
 => => transferring context: 2B                                                                 
 => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0                               
 => [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0                            
 => [build 1/6] FROM mcr.microsoft.com/dotnet/sdk:6.0                                           
 => [internal] load build context                                                               
 => => transferring context: 11.95kB                                                            
 => [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0                                         
 => CACHED [base 2/2] WORKDIR /app                                                              
 => CACHED [final 1/2] WORKDIR /app                                                             
 => CACHED [build 2/6] WORKDIR /src                                                             
 => CACHED [build 3/6] COPY [xxx.csproj, xxx/]                                                  
 => CACHED [build 4/6] RUN dotnet restore "xxx/xxx.csproj"                                      
 => CACHED [build 5/6] COPY . .                                                                 
 => CACHED [build 6/6] RUN dotnet build "xxx.csproj" -c Release -o /app/build                   
 => CACHED [publish 1/1] RUN dotnet publish "xxx.csproj" -c Release -o /app/publish             
 => CACHED [final 2/2] COPY --from=publish /app/publish .                                       
 => exporting to image                                                                          
 => => exporting layers                                                                         
 => => writing image sha256:484ba79107d8ae9652ed86159cf622f4cee395e6edb4b48ea3b0c298c33b8364    
 => => naming to docker.io/library/test
e
I don't think there's a workaround for this currently. The issue is that the build step isn't part of the CRUD lifecycle its just done as part of the image constructor. We do have issues about this: https://github.com/pulumi/pulumi-docker/issues/132. Comment on there suggest giving https://github.com/MaterializeInc/pulumi-docker-buildkit a try.
🙌 1
q
Thanks @echoing-dinner-19531