'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.
Solution 1:[1]
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
For confirmation, run docker version and you'll see the following line in the output
Client: Docker Engine - Community
....
Experimental: true
....
Solution 2:[2]
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
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Patrick Pan |
| Solution 2 | imriss |
| Solution 3 |
