This repository contains the packaging metadata for creating a snap of PostgreSQL built from the official Ubuntu repositories.
For more information about using the PostgreSQL snap, including commands and examples, see docs/ folder.
sudo snap install postgresqlClone the repository:
git clone [email protected]:canonical/postgresql-snap.git
cd postgresql-snapInstall and configure prerequisites:
sudo snap install snapcraft
sudo snap install lxd
sudo lxd init --autoIn order to properly test the confinement of the snap, we must install it using the --dangerous flag, instead of the --devmode one. See snap installation modes.
snapcraft pack
sudo snap install ./postgresql*.snap --dangerous --jailmodeSee the examples below for how to use Spread for snap testing:
snapcraft test # run all tests
ls -la spread/tests/ # list all tests
snapcraft test -- spread/tests/smoke # run one test suite
snapcraft test --debug # to open shell for failed testThe PostgreSQL Snap is free software, distributed under the Apache Software License, version 2.0. It installs, operates and depends on PostgreSQL, which is licensed under the PostgreSQL License, a liberal Open Source license similar to the BSD or MIT licenses.
Postgres, PostgreSQL, Slonik Logo are trademarks or registered trademarks of PGCA. Other trademarks are property of their respective owners. Canonical's PostgreSQL offerings are not sponsored, endorsed, or affiliated with PGCA.