seawall container adopt

Bring a container started with docker run under a compose stack.

Bring a container started with docker run under a compose stack

Its compose file is written from how it runs now: the same image (tag and digest), environment, ports, volumes and networks. The old one is kept, stopped, and started again if the stack doesn't come up.

Usage

seawall container adopt [OPTIONS] <NAME>

Changes the host

Without --yes it prints the plan and changes nothing.

Arguments

<NAME>

The container, by name (see seawall container ls)

Required.

Options

--stack <STACK>

The stack's name (default: the container's)

--accept-missing

Adopt it without what the compose file can't say, which the plan names

--keep-bridge

Keep it on Docker's default bridge, not the stack's own network

--yes

Carry out the plan (without it, this is a dry run)

Every command also takes the global options.

Examples

seawall container adopt vaultwarden
seawall container adopt vaultwarden --stack passwords --yes