When working with Docker containers on CircleCI, if you try to run
docker run with the
--rm flag your builds will fail with the error message below:
Error removing intermediate container 1f3a1d541241: Driver btrfs failed to remove root filesystem 1f3a1d541241e757d48f34329508253e9ee139380b7b914a3b1104677eb0e8ee: Failed to destroy btrfs snapshot: operation not permitted
Docker gives this error because it’s not possible to remove the container image in the file system that we are using on CircleCI. We are working to fix the Docker daemon so that it does not not try to remove intermediate container image to suppress the error in the future container release.
In order to fix this issue for now, skip this step by removing the
--rm flag from the
docker run command.