Is there anyway to run remote docker with experimental flag?

docker

#1

I’d like to use the --squash flag with the images I have CircleCi configured to build.

–squash" is only supported on a Docker daemon with experimental features enabled

Is there anyway to run the remote docker with the experimental flag, or a version of it with that already enabled? Maybe something like,

  • setup_remote_docker:
    version: 17.05.0-ce
    experimental: True

#2

I was able to make this work using machine instead of docker image. This is a bummer because I’m missing out on all the sweet prebaked goodness from the base images.


#3

I’d really like to take advantage of --compress and --squash. Is there a way to enable experimental using config.yml?


#4

You can change to use a VM, and these are the first steps I use to enable experimental features.

steps:
  - checkout
  - run:
      name: set docker daemon to experimental
      command: |
        sudo sh -c 'echo '\''DOCKER_OPTS="--experimental=true"'\'' >> /etc/default/docker'
        sudo service docker restart

#5

I’m also trying to do the same thing. Any chance you could post a more complete config.yml file? :grin:

All I get is an error:

docker: unrecognized service

You can change to use a VM

I’m not sure what you mean by that or how you do that.


#6

Ah… so I answered my own question. You need to configure your build to run in the machine executor instead of the docker one. https://circleci.com/docs/2.0/executor-types/#machine-executor-overview

@rwillard’s suggestion for adding the ability to turn on experimental docker functionality from within config.yml would still be super valuable because right now I’m also having to install a bunch of stuff custom on the machine VM.

^ @FelicianoTech is this possible?


#7

Not really no. You can now choose a machine VM image to get you newer versions of Docker and tools, but that’s currently it. https://circleci.com/docs/2.0/executor-types/#machine-executor-overview


#8

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.