CouchDB requires Ubuntu 16.04. If building on 18.04, then LXD might be useful.
lxc launch ubuntu:16.04 couchdb-pkg
lxc exec couchdb-pkg bash
sudo apt update
sudo apt install snapd snapcraft
git clone https://github.com/couchdb/couchdb-pkg.git
cd couchdb-pkg
snap/snapcraft.yaml
to point to the correct tag (e.g. 2.2.0
)snapcraft
You may need to pull the LXD file to the host system.
$ lxc file pull couchdb-pkg/root/couchdb-pkg/couchdb_2.2.0_amd64.snap /tmp/couchdb_2.2.0_amd64.snap
The self crafted snap will need to be installed in devmode
$ sudo snap install /tmp/couchdb_2.2.0_amd64.snap --devmode