Run a Docker image
Updated
An AppVM is a Docker or OCI image booted as its own virtual machine. It has its own kernel and its own disk, and no container engine runs inside it. The machine is the boundary.
You keep the parts of the container workflow that matter: the image you already publish, environment variables, restart policies, health checks, and logs.
Import an image
Section titled “Import an image”An OCI image becomes a template before it can boot. Open AppVM images under Compute and add one.
-
Find the image.
Search the public catalog, or type a full image reference yourself. Typing the full reference is the way in for a private or self-hosted registry, with credentials when the registry needs them.
-
Let the host convert it.
Virtainer Free pulls the image and converts it into a bootable template. This happens once per image, on the host.
-
Check the result.
The template records what the image declared: its entrypoint and command, environment, working directory, user, and health check.
You can also build a template from a Dockerfile with a build context, or from a git repository, and rebuild it later from the same source.
Create the AppVM
Section titled “Create the AppVM”Open Instances under Compute and create one from your template. Size it, attach it to a network the same way as a classic VM, set environment variables, and choose a restart policy.
Before you create it, it is worth knowing whether your image runs unchanged.
Most service images do. Base images such as alpine, debian, node, and
python exit immediately, because their entrypoint is an interactive shell.
Will my image run? covers this in one page.
Publishing a template
Section titled “Publishing a template”A template built on this host exists only as a disk image here. Publish on a ready template row pushes it to a registry so another host can pull it instead of building it again.
- Choose the registry, and give the
namespace/repoand tag. - Supply credentials for that registry. They are required, and they are not written to logs.
- Watch it go. The push runs in the background, and the Logs button shows its progress live.
Free hosts can publish to Docker Hub and Quay. A failed push turns its status label into a button: opening it shows why the host stopped, along with the raw push output as evidence.
Restart policies
Section titled “Restart policies”| Policy | Behaviour |
|---|---|
no | Never restarted automatically |
always | Restarted whenever the workload exits |
on-failure | Restarted only on a non-zero exit |
Restarts back off from 2 seconds up to a 5 minute ceiling, and the counter resets after the workload has stayed up for 30 seconds. A machine you stopped yourself is never restarted automatically.
Persistence
Section titled “Persistence”The system disk is a private copy of the template and survives stop and boot. It does not survive a redeploy, which resets it from the new template on purpose.
Anything you need to keep across a redeploy belongs on a data volume. See Data volumes.