Log inStart free
← Guides

Deploy Any Docker image

Deploy a Any Docker image app to Aloof in a few minutes. You need the CLI and an account.

# install the CLI into ~/.local/bin (make sure that folder is on your PATH)
$ mkdir -p ~/.local/bin && curl -fsSL https://api.aloof.si/cli/aloof -o ~/.local/bin/aloof && chmod +x ~/.local/bin/aloof

# new here: create a free account (no card) and save the key
$ aloof signup you@example.com
# already have an account: paste an API key from Dashboard → API keys
$ aloof login

Prefer a system-wide install? See the Quickstart. If you'd rather not touch your PATH, download it into the current folder and run it as ./aloof.

1. Generate config

aloof launch detects Any Docker image from an existing image or Dockerfile and writes a Dockerfile (unless you have one), aloof.toml and .dockerignore.

$ aloof launch --name my-docker

2. Review aloof.toml

app = "my-docker"
primary_region = "nbg1"

[http_service]
  internal_port = 8080
  auto_stop_machines = true
  min_machines_running = 0

[processes]
  web = "(your CMD)"

Aloof sets PORT=8080. With min_machines_running = 0 the app sleeps when idle and you pay per second only while it runs.

3. Database (optional)

$ aloof pg create my-docker-db --plan pg-dev
$ aloof pg attach my-docker-db my-docker     # sets DATABASE_URL over the private network

4. Deploy

$ aloof deploy
live: https://my-docker.aloof.si/

The directory is uploaded (respecting .dockerignore) and built remotely. New instances must pass their health check before the old ones stop.

Notes for Any Docker image

Deploy a public or private image directly: aloof deploy --image ghcr.io/acme/api:1.4. For private registries run aloof registry login ghcr.io -u USER --password-stdin first.

Next