assets/chezmoi.io/docs/reference/commands/docker.md
docker!!! Warning
`docker` is an experimental command.
!!! Hint
To use [podman](https://podman.io/) instead of Docker, set the
`docker.command` configuration variable to `podman`. You can also
use the [`chezmoi podman` command][chezmoi-podman] instead of
`chezmoi docker`.
Install chezmoi, run chezmoi init --apply, and optionally execute your shell
in Docker containers.
exec container-id init-args...Install chezmoi, run chezmoi init --apply *init-args*, and execute your shell
in the existing Docker container container-id.
-i, --interactiveKeep stdin open even if not attached.
-p, --package-manager package-managerInstall chezmoi using package-manager, if possible. Valid values for
package-manager include apk, apt-get, brew, dnf, nix-env, pacman,
port, pkg, rpm, snap, xbps-install, and zypper. Otherwise, fall back
to curl or wget installation. If neither curl nor wget are installed
then install them with package-manager.
-s, --shellAfter installing chezmoi, initializing your dotfiles, execute your shell. This is the default.
run image-id init-args...Create a new Docker container using image-id, and in it, install chezmoi, run
chezmoi init --apply *init-args*, and execute your shell.
-p, --package-manager package-managerInstall chezmoi using package-manager, if possible. Valid values for
package-manager include apk, apt-get, brew, dnf, nix-env, pacman,
port, pkg, rpm, snap, xbps-install, and zypper. Otherwise, fall back
to curl or wget installation. If neither curl nor wget are installed
then install them with package-manager.
chezmoi docker exec $CONTAINER_ID $GITHUB_USERNAME
chezmoi docker run -p apk alpine:latest $GITHUB_USERNAME