flk export
Export the current flake configuration to Docker, Podman, or JSON.
flk export --format docker
flk export --format podman
flk export --format json
flk export --format docker --profile backend
Options
-f, --format <FORMAT>: Export format —docker,podman, orjson(required)-p, --profile <PROFILE>: Target a specific profile instead of the default
Formats
Docker
Builds a Nix-based Docker image from the flake and loads it into the local Docker daemon.
- Requires Docker to be installed and running
- The image is built via
nix build .#docker-<profile>and loaded withdocker load - Output image is stored at
.flk/resultbefore loading
Podman
Same as Docker but uses Podman instead.
- Requires Podman to be installed and running
- Built via
nix build .#podman-<profile>and loaded withpodman load
JSON
Serializes the parsed flake configuration to a flake.json file in the project root.
- Includes all profiles, packages, environment variables, and inputs
- Useful for debugging, CI pipelines, or integrating with other tools
- Does not require Docker or Podman
Notes
- Docker and Podman exports use
--impurefor Nix builds - Uses standard profile resolution when
--profileis not specified
See Also