Install the latest Docker version. Please see the Installation section on Docker website to learn how to get it.
git clone --recursive https://github.com/ONLYOFFICE/DocumentServer.git
cd DocumentServer
sudo docker run --rm -v $PWD:/var/lib/onlyoffice onlyoffice/documentserver-builder