Skip to main content
edited tags
Link
Dawny33
  • 2.8k
  • 3
  • 23
  • 62
Source Link
030
  • 13.3k
  • 16
  • 75
  • 175

How to run experimental Docker features on CircleCI

When a build is started on CircleCI one of the first things that is done is:

Setup a remote Docker engine

Specified reusable docker engine, but build has not been whitelisted.
Contact CircleCI to be whitelisted
Allocating a remote Docker Engine
...
Remote Docker engine created. Using VM 'prealloc-wrjtu1qd-1491949826270'
Created container accessible with:
  DOCKER_TLS_VERIFY=1
  DOCKER_HOST=tcp://<IP>:2376
  DOCKER_CERT_PATH=/tmp/docker-certs615987123
  DOCKER_MACHINE_NAME=51123

Subsequently when docker build --squash -t imagename . is run on CircleCI it results in:

Error response from daemon: squash is only supported with experimental mode
Exited with code 1

Discussion

It works to use experimental features locally after changing the /etc/docker/daemon.json as follows:

{
    "experimental": true
}

and restarting the docker systemctl service, but how to do that on CircleCI? It seems impossible as the build output indicates that a connection is made to a remote docker that reside on the CircleCI systems.