Install prerequisites
Install qemu and supporting utilities:-
sudo apt install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virtinst
Download Ubuntu
At the time of writing, 18.04 is the latest. I usually store ISOs in a separate directory to the VM images, so feel free to adjust the below to suit.
wget http://releases.ubuntu.com/18.04.1/ubuntu-18.04.1-live-server-amd64.iso
Create a guest
Create a guest VM. Again, the below settings are really a minimum requirement, so adjust to your tastes.
virt-install --name=dokku --vcpus=1 --memory=1024 --cdrom=ubuntu-18.04.1-live-server-amd64.iso --disk size=10
This will open up
virt-viewer
so you can see the console. Alternatively, you can use the
--graphics vnc
option to enable the VNC server.
Install Ubuntu
Install Ubuntu. You can accept the defaults. You might need to enable the universe repository, which you can do by editing
/etc/apt/sources.list
(see
here for more information).
Install Dokku
Download the Dokku installer:-
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.12/bootstrap.sh
Have a look at bootstrap.sh before running it, making sure nobody’s snuck anything nefarious in there. If you’re feeling particularly paranoid,
bootstrap.sh
itself pulls the Docker install script, so you might want to grab that too and give it a once-over before continuing.
Run the installer:-
chmod +x bootstrap.sh
sudo ./bootstrap.sh
Configure Dokku
Open http://<your vm IP>/ in a browser, and tell Dokku:-
- your SSH public key
- a hostname
- whether you want to enable virtualhost naming
Once you hit Finish Setup, Dokku will shut down the web server and redirect you to
http://dokku.viewdocs.io/dokku~v0.12.12/deployment/application-deployment/, giving you the first steps to deploying apps to Dokku.