I want to squash my docker image so that I can remove intermediate containers that contain secrets. Docker allows you to do this with the squash flag:
docker build -t $IMAGE_NAME --build-arg SECRET_KEY=$SECRET_KEY --squash .
The problem is pipelines doesn't have experimental features enabled:
"--squash" is only supported on a Docker daemon with experimental features enabled
Is there a way to enable these features for Docker in Bitbucket Pipelines?