This directory contains a tool to convert images of Linux containers (tar files) into Fuchsia packages that can be run in Starnix.
Given a tar file with the contents of the root filesystem:
$ fx host-tool convert_tarball_to_starnix_container --input-format tarball \ ~/rootfs.tar ~/example.far
Build the image as usual, e.g.:
$ docker build -t example .
Save it with docker save
:
$ docker save example -o ~/example.tar $ fx host-tool convert_tarball_to_starnix_container --input-format docker-archive \ ~/example.tar ~/example.far
$ ffx repository publish "$(fx get-build-dir)/amber-files" --package-archive ~/example.far $ ffx component run --recreate \ /core/starnix_runner/playground:example \ fuchsia-pkg://fuchsia.com/example#meta/container.cm
Launch an interactive shell in it:
$ ffx starnix console --moniker /core/starnix_runner/playground:example /bin/sh -i