Twelve days after 1.2. backup and port-forward are new ground; the rest is
usability - the commands that were still missing, and the ones that did not do
what they said.
What 1.3 brings
backup, by @ishaan-jindal. It copies a project’s named volumes into a
separate <project>-backup project with per-run restore points, where
down --volumes and down --project cannot reach them. create, list,
verify, restore and delete --keep-last N; the pool comes from
x-incus-compose.backup.pool.
port-forward port-forward SERVICE TARGET_PORT [LISTEN_PORT] runs a local
TCP listener and forwards into the instance, reaching a port that was never
published. It needs Incus 7.3 or 7.0.2 LTS.
Usability
run. incus-compose run SERVICE [COMMAND] starts a one-off instance and
exits with the command’s own status. Nothing else treats it as a service: up
never reconciles it, ps lists it under its service, down removes it without
--rm, and ic-healthd never restarts one. pull and up prefetch the one
image a one-off needs, so an air-gapped site can run later; --init points
that at a mirror. A cluster mixing CPU architectures is not yet supported.
Seven more docker compose commands: pause, unpause, kill, cp,
top, events and port. A pause also marks the instance stopped for
ic-healthd, which would otherwise restart it out of the pause. kill -s takes
only SIGKILL, in docker’s three spellings: the Incus state API carries no
signal. top reports per instance where docker reports per process. Plus
healthd status, which prints the shared daemon’s health status key.
command: replaces the image’s CMD, the way the compose spec says,
instead of appending to the image’s entrypoint. Telling an image’s entrypoint
and command apart meant reading them from the registry, so incus-compose now
carries an OCI registry client of its own - the same one that reads the VOLUME
declarations below. A compose file carrying a workaround for the old behaviour
can go back to its plain form.
Volumes are filled from the image. Every path an image declares as a
VOLUME gets a storage volume of the service’s own, instead of the tmpfs that
lost its contents on restart, and a named volume starts from what the image
ships at its target: conf:/etc/nginx/conf.d is no longer empty on the first
run. x-incus-compose.auto-volumes: false and volume: {nocopy: true} turn
each off.
Profiles, by @alien43. x-incus-compose.profiles sets a service’s full
Incus profile list on create, with the same semantics as
incus launch --profile: a list that omits default leaves the instance
without it. Nothing in a compose file could express profile membership before.
Mixed-architecture clusters. The image cache is keyed by architecture, so a
cluster mixing architectures no longer serves one member’s image to all of them,
and platform: is honoured for pulled images in the spelling docker uses
(linux/arm/v7). ic-healthd is published for ppc64le, s390x and riscv64
besides amd64 and arm64.
Three changes to know about
stop waits now. stop, and restart with it, shuts a service down
gracefully and kills it once --timeout is up. Both killed outright before, so
--timeout did nothing at all. kill is the old behaviour under its own name.
--pull always only re-fetches an image the registry moved, rather than
dropping every registry image and downloading it again per run. up recreates
the services whose image it replaced, and a registry the client cannot reach
leaves the stored image alone instead of failing.
Cached images from before 1.3 carry no architecture. They are re-fetched
once and then left in the cache until you delete them by hand.
Also in this release: user: may name its user and group
(user: "netbox:root"), resolved against the image’s own /etc/passwd and
/etc/group; an external network can name <project>:<network> to attach to a
managed network owned by another compose project; a config or secret whose
target sits inside a volume is written into that volume instead of under the
mount that hid it; and up no longer hangs until the start timeout on a service
that was already reported healthy. The CHANGELOG has the rest.
Updating
incus-compose self-update
incus-compose up --detach # once per compose project
The shared ic-healthd replaces itself with the newer one on the first up.
Containers keep running: no --recreate, no downtime. Skip a project and
nothing breaks, it stays as it is.
Not self-update from 1.0.0 or 1.1.0, which always downloads the macOS
build whatever your platform is and so cannot replace itself. Reinstall once
with the one-liner below and self-update works from there on.
First install
curl -sSfL https://raw.githubusercontent.com/lxc/incus-compose/main/install.sh | sh -s -- -b ~/.local/bin
Arch users: incus-compose-bin and incus-compose-git, maintained by @neitsab and @jochumdev.
Debian users: zabbly/incus ships incus-compose via its incus-extra package.
Docs: CLI reference · docs.incus-compose.org
Full changelog: CHANGELOG.md
What’s next: OVN network support (#15) and network ACLs (#98), both still in design, and the DNS work.
Thanks to
- @ishaan-jindal for
backup - @alien43 for
x-incus-compose.profiles, the
--pull alwaysrecreate, a gateway-check fix, and for proposing several more
of the changes in this release - @stgraber for the consulting and the upstream fixes
And to everyone testing, reporting bugs, spreading the word, and just using
incus-compose.
Real-world compose files remain the most useful bug reports.
René
Repo: GitHub - lxc/incus-compose: A drop-in replacement for docker compose that runs your compose.yaml on Incus · GitHub
Releases: Releases · lxc/incus-compose · GitHub
Changelog: incus-compose/CHANGELOG.md at main · lxc/incus-compose · GitHub
Previous threads: v1.0 · v1.1 · v1.2
