Create a Container App from an Image

Who this is for

Users who want to run a pre-built Docker image (from Docker Hub, GitHub Container Registry, or any registry) on a server managed by CloudAIPilot.


Prerequisites

  • Server is running with SSH connectivity and Docker installed.
  • You know the Docker image reference (e.g., nginx:1.27, myuser/myapp:latest).
  • If using a private registry: the server can authenticate to it (see note on private registry auth below).

How to Create a Container App

  1. Go to Servers → open the server.
  2. Click the Apps tab.
  3. Click + Create App.
  4. Select Container App.
  5. Fill in the form:
FieldDescriptionExample
App nameInternal label in CloudAIPilotmy-api
Image referenceDocker image + tagnginx:1.27 or ghcr.io/user/myapp:v2
Host portPort on the server to expose8080
Container portPort the app listens on inside the container80
Health pathHTTP path for healthcheck (optional)/health
Restart policyWhen to restart the containerunless-stopped (default)
CommandOverride Docker CMD (optional)
CPU limitMax CPU cores (optional)1.0
Memory limitMax RAM in MB (optional)512
Environment variablesKey-value pairs passed to the containerNODE_ENV=production
  1. Toggle Deploy now ON to start the container immediately after saving.
  2. Click Create.

Restart Policies

PolicyBehavior
unless-stopped (default)Restarts automatically unless explicitly stopped
alwaysRestarts on any exit, including manual stop
on-failureRestarts only on non-zero exit codes
noNever restarts automatically

Use unless-stopped for most production apps. Use no for one-off jobs.


What Happens After Creation

  1. CloudAIPilot connects to the server via SSH.
  2. Runs docker pull to fetch the image.
  3. Runs docker run with the specified ports, env vars, and limits.
  4. Monitors the container status.

The app appears in the Apps tab with status pendingrunning.

Progress is visible in the Activity Center.


After the App Is Running


Private Registry Authentication

If your image is in a private registry, you must authenticate Docker on the server first:

  1. SSH into the server or use the Terminal tab.
  2. Run: docker login ghcr.io -u your-username --password-stdin (then paste your token).
  3. Or for Docker Hub: docker login -u your-username

CloudAIPilot does not yet manage Docker registry credentials directly.


App Status Values

StatusMeaning
pendingApp created, deploy triggered or queued
runningContainer is running
stoppedContainer is stopped (no auto-restart active)
failedContainer exited with an error
deletingApp is being cleaned up

What Success Looks Like

App status shows running. If you set a host port, curl http://: returns a response from the container.


Common Issues and Fixes

IssueLikely causeFix
"PORT_CONFLICT" errorHost port already used by another app or siteUse a different host port, or check the Port Check feature.
App status stays "pending"Docker pull failed or SSH issueCheck Activity Center logs. Verify image name and registry auth.
App status "failed" after deployContainer exited — app crashCheck logs via the Logs tab — see KB-04-12: App Logs.
"NAME_CONFLICT" errorApp name already used on this serverUse a different name.

Related Articles