Is there a way to edit files that live in a stopped container?

Hello guys,

Today I found myself in a situation where starting a container would of course start a process that runs in that container, but I didn’t want this to happen and, at first, the solution looked simple, just edit the config file of one of the services in that container before starting it, so the process would not launch right after the container is started…

But, is that even possible… Is there a way to edit files that live in a stopped container, without starting it first?

What backend

I’m running LXD 3.18 on top of Ubuntu 18.04 with ZFS

lxc file push/pull/edit work against stopped containers.

1 Like

Thank you @stgraber.
I should have tried before asking, now I feel like an idiot…
For some reason, in my head, it was obvious these commands work only with running containers, and so I needed to “hack the system”. rofl