Skip to content

Import a stack file

This task is read-only. import-stack prints converted manifest text to stdout. It does not write files, create state, observe Apple container, contact registries, or pull images.

Terminal window
hostwright import-stack compose.yaml
hostwright import-stack compose.yaml --output json

Text mode prints the converted manifest; warnings go to stderr, so you can redirect stdout safely. JSON mode returns the manifest and structured warnings, or a validation-style error envelope on failure.

The accepted subset is intentionally small:

  • top-level name or project, and services;
  • service image;
  • command as an inline array;
  • environment as a key-value map of scalars;
  • ports as string entries like "8080:8080";
  • volumes only with explicit host-path sources (./data, /tmp/data);
  • healthcheck.test only as ["CMD", ...], plus healthcheck.interval;
  • restart as a scalar policy or restart.policy.

Converted output still runs through Hostwright manifest validation; invalid names, missing images, unsafe ports, unsafe mounts, and plaintext credential-like environment keys fail closed.

  1. hostwright import-stack compose.yaml > hostwright.yaml
  2. Review every converted image, port, volume, environment value, health check, and restart policy yourself.
  3. hostwright validate
  4. hostwright plan
  5. Start only through the plan-hash confirmation gate and the authenticated local daemon; import-stack never performs this step.