GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders
Docker build squash
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 616
- PR merge metrics
- No merged PRs in 30d
Description
I would like to enable squash during build, but none of the workarounds available seem to do the trick, below is the current build and dockerfile, with following error
> "Step #1 - "build": "--squash" is only supported on a Docker daemon with experimental features enabled"
```
#syntax=docker/dockerfile:1.5.2
FROM jupyter/r-notebook:ubuntu-20.04
```
```
steps:
- id: 'pull-experimental'
name: 'gcr.io/cloud-builders/docker'
args: [ 'pull', 'docker/dockerfile:1.5.2' ]
env:
- DOCKER_BUILDKIT=1
# build the container image
- id: 'build'
waitFor: ['pull-experimental']
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
['-c', 'docker build --squash --memory-swap=-1 -t eu.gcr.io/$PROJECT_ID/${_IMAGE_TAG} -f ${_IMAGE_NAME}/Dockerfile .']
env:
- DOCKER_BUILDKIT=1
```
Contributor guide
Assessment
This issue has not been assessed yet.