How to run docker with experimental functions on Ubuntu 16.04

To turn on experimental docker functions create following file by:

sudo nano /etc/docker/daemon.json

and add below content to it

{ 
    "experimental": true 
} 

and save file (by CTRL+X and Enter ) and exit. In terminal type:

sudo service docker restart

To check that experimental funcions are ON, type in terminal:

docker version

And you should see Experimental: true

UPDATE

Instead of nano you can use this one-liner:

echo '{\n    "experimental": true\n}' | sudo tee /etc/docker/daemon.json;

Refer: https://stackoverflow.com/questions/44346322/how-to-run-docker-with-experimental-functions-on-ubuntu-16-04