canonical / pebble

Pebble is a lightweight Linux service manager with layered configuration and an HTTP API.
https://canonical-pebble.readthedocs-hosted.com/
GNU General Public License v3.0
146 stars 54 forks source link

feat(daemon): Add support for `PEBBLE_COPY_ONCE`. #352

Closed hpidcock closed 7 months ago

hpidcock commented 8 months ago

$PEBBLE_COPY_ONCE environment variable allows pebble run to copy layers and state from another directory when seeding a new $PEBBLE directory.

The rationale for this change is to allow OCI images to specify existing layers in the default $PEBBLE location. Then at runtime, be able to run pebble with a different $PEBBLE directory. This allows pebble to be run as a non-root user or run on a read-only root filesystem.

Issue #351 outlines that pebble run has no unit or integration tests. A test should be performed manually for now.

Manual QA is as follows:

JU090 JUJU-5435

benhoyt commented 7 months ago

One other thought: we should document this in README.md somewhere. Or maybe in the help text?