This message was deleted.
# aws
s
This message was deleted.
m
More context: after trying this with Github actions, it looks like it pulls the image from the container repository but doesn't actually use it during the build process
Tried with both
true
and this configuration:
Copy code
if (dockerArgs) {
    // Need this for caching to work properly
    dockerArgs.BUILDKIT_INLINE_CACHE = "1";
  }
  else {
    dockerArgs = {}
  }

  // Build and push the image to ECR.
  // TODO: Docker images get built and pushed every time if things haven't changed.
  // This is a bug: <https://github.com/pulumi/pulumi-docker/issues/132>
  // See if we can fix this by using git hashes.
  const image = repo.buildAndPushImage({
    context: `../../../${project}`,
    ...(dockerfileName && {
      dockerfile: `../../../${project}/${dockerfileName}`,
    }),
    ...(dockerArgs && {args: dockerArgs}),
    args: dockerArgs,
    env: {
      DOCKER_BUILDKIT: '1',
    },
    // We need this to build images on M1 architecture.
    extraOptions: ['--platform=linux/amd64', '--quiet'],
    extraOptions: ['--platform=linux/amd64', '--quiet', '--load'],
    // Support docker layer caching by pulling the latest image
    cacheFrom: { stages: ['pre-deps', 'deps', 'build']},
    target: 'final'
  });
In the Github action it pulled the image from the repository, but it didn't actually use it to build the image.