简体   繁体   中英

How to enable “--squash” feature of Docker in Arch Linux?

To use --squash feature of Docker , you need to enable the experimental features of the Docker daemon . How this can be done on Arch Linux ?

Thanks.

This is how I got it to work in ArchLinux with systemd

/etc/docker/daemon.json

added the json blob below

{ 
    "experimental": true 
} 

then restart the service

systemctl restart docker.service

On Arch Linux , you can add --experimental=true to the end of the ExecStart=/usr/bin/dockerd -H fd:// line in the /usr/lib/systemd/system/docker.service file in order to enable the experimental feature.

Then, you need to reload and restart the Docker daemon :

systemctl daemon-reload
systemctl restart docker.service

With recent docker versions neither of the methods works any more. See https://github.com/docker/cli/issues/947

As a summary, there is docker and docker cli. Both are not the same. Experimental mode must be enabled for docker cli. Thus one has to edit the file $HOME/.docker/config.json .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM