# Docker Image on a GPU Server: Bring Your Own, Private Too

Published 19 October 2026, updated 7 November 2026. 5 min read. For: ML and platform engineers who ship their environment as a container.

## Key facts

- On Arrakis any public Docker image boots on a GPU server you rent by the hour, and private images boot with a read-only registry login.
- Before anything is charged, Arrakis asks the registry whether the image exists, can be pulled and has a linux/amd64 build.
- SSH is added at start, so your image needs a shell, a linux/amd64 build and CUDA 13.0 or older.
- Private images work from Docker Hub, ghcr.io, Amazon ECR, Google Artifact Registry, Azure, NVIDIA NGC, GitLab, Quay or your own public HTTPS registry.
- A 12 GB image can take 10 to 20 minutes on a slow network, so keep datasets and model weights on a volume at /mnt.

Your environment already works in a container. Rebuilding it by hand on every rented GPU server is paid time you never get back. On Arrakis any public Docker image boots on a GPU server you rent by the hour, private images boot with a read-only registry login, and SSH is added at start. The image you tested on your laptop is the image that runs on the GPU.

## Public images: paste and rent

In the Rent sheet, choose **Your own image** under Image and paste it the way `docker pull` takes it: `vllm/vllm-openai:v0.11.0`, `nvcr.io/nvidia/pytorch:25.01-py3`, your team's tag. Before anything is charged, Arrakis asks the image's registry whether it exists, can be pulled and has a linux/amd64 build. A typo is refused for free, not discovered an hour into a rental.

Over the API it is two fields on the rent call:

```sh
curl -X POST https://arrakis.goodailabs.com/v1/instances \
  -H "Authorization: Bearer $ARRAKIS_TOKEN" -H "Content-Type: application/json" \
  -d '{"node_id": "<node>", "name": "vllm", "termination_hours": 2, "ssh_public_key": "ssh-ed25519 AAAA...",
       "image": "vllm/vllm-openai:v0.11.0", "start": "image"}'
```

## Build it so it boots

Four things decide whether your image runs well on a rented GPU:

- **linux/amd64.** Building on an Apple Silicon laptop gives you arm64 by default. Build for the machine:

  ```sh
  docker buildx build --platform linux/amd64 -t ghcr.io/acme/trainer:v3 --push .
  ```

- **A shell.** SSH is added at start, so you never install it yourself, but the image needs a shell for it.
- **CUDA 13.0 or older.** Every machine on Arrakis has an NVIDIA driver from the 580 series or newer, and CUDA 13.0 runs on all of them, Blackwell included. The driver comes from the machine, not your image.
- **Size.** The first start on a machine downloads the image. A 12 GB image can take 10 to 20 minutes on a slow network. Every gigabyte you trim is a faster first login. Datasets and model weights do not belong in the image at all: keep them on a [volume](/docs/volumes.html.md) at `/mnt`, which outlives every machine.

One more habit worth stealing: pin it. The image field also takes a digest, such as `ghcr.io/acme/trainer@sha256:...`. Tags move; a digest boots the exact bytes you tested, on every rental, for every teammate.

Want a base to build on? The Arrakis images are public on Docker Hub (`goodailabs/arrakis:pytorch-2.14.1-cuda13.0` is the default), with PyTorch, CUDA 13.0 and everyday tools already in, so you pull the same image locally that machines boot.

## Private images: a read-only login

On **Images** in the console, choose **Add an image**, tick **It's private: log in to pull it**, and give the login `docker login` would take. Arrakis checks the image with it before saving, keeps the login encrypted, and uses it only to pull this image when you rent. The password is never shown again.

| Registry | Username | Password or token |
|---|---|---|
| Docker Hub | Your username | A read-only personal access token |
| GitHub (`ghcr.io`) | Your username | A classic token with only `read:packages` |
| Amazon ECR | An access key ID | Its secret access key |
| Google (Artifact Registry, `gcr.io`) | `_json_key` | A service account JSON key with Artifact Registry Reader |
| Azure (`azurecr.io`) | A repository token or service principal | Its password, pull access only |
| NVIDIA NGC (`nvcr.io`) | `$oauthtoken` | Your NGC API key |
| GitLab | A deploy token's username | The deploy token, with `read_registry` |
| Quay | A robot account | Its token |

Three details that save a support ticket:

- **Amazon ECR:** use an AWS user that can only pull. Each time you rent, Arrakis trades the key for a fresh 12-hour pull login, so the machine never sees the key itself.
- **Your own registry** (Harbor, Artifactory, Nexus, self-hosted GitLab or Quay) works if machines can reach it: public DNS, HTTPS, a certificate from a public authority. A registry behind a VPN or an IP allowlist cannot be reached, and a self-signed certificate is refused.
- **Read-only, always.** The machine pulls with that login, and the image can stay cached on the host after your rental ends. Keep secrets out of the image.

Over the API, save the image with `POST /v1/templates` (a token with the manage scope), building the JSON with jq so the token never lands in your shell history:

```sh
jq -n --arg pw "$GHCR_READ_TOKEN" \
  '{image: "ghcr.io/acme/trainer:v3", name: "trainer-v3", start: "idle",
    registry_username: "acme-bot", registry_password: $pw}' \
| curl -X POST https://arrakis.goodailabs.com/v1/templates \
    -H "Authorization: Bearer $ARRAKIS_TOKEN" -H "Content-Type: application/json" -d @-
```

Then rent it by id:

```sh
curl -X POST https://arrakis.goodailabs.com/v1/instances \
  -H "Authorization: Bearer $ARRAKIS_TOKEN" -H "Content-Type: application/json" \
  -d '{"node_id": "<node>", "name": "train", "template_id": "<image id>", "termination_hours": 4,
       "ssh_public_key": "ssh-ed25519 AAAA..."}'
```

Answers show `private` and `registry_username`, never the password. To change the token, `PATCH /v1/templates/{id}` with both username and password, or **Change login** in the console. Removing the image deletes its login everywhere Arrakis kept it.

## Choose how it starts

| Start | What runs | Use it for |
|---|---|---|
| `idle` (default) | Nothing; the machine waits for you | Training, notebooks, anything you start over SSH |
| `image` | The image's own entrypoint and command | Servers such as vLLM, TGI or SGLang |
| `command` | One plain line you give, such as `python -m http.server 8000` | A job that starts by itself |

A `command` is one plain line: no quotes, pipes, `;`, `&`, `$` or redirects. If the command exits, the machine can no longer be reached, so when in doubt, start `idle`. A server on the machine is reached through SSH:

```sh
ssh -L 8000:localhost:8000 root@<host> -p <port>
curl localhost:8000/v1/models
```

Environment variables (`KEY=value`, one per line) are stored with the image, so they are for settings, not secrets. Export secrets in your SSH session instead.

## Agents use your images too

Over MCP, `list_images` returns the Arrakis images and your saved ones, private ones marked, and `rent_gpu` takes a `template_id` or any public `image` with a `start`. An agent can boot your exact environment without ever holding the registry password. CI can too: [a GPU runner for CI](/blog/ci-pipeline-rent-gpu.html.md) rents with your test image.

## Serving a model? Skip the image

If the container exists only to serve a Hugging Face model, do not build it. [Deploy the model](/deploy.html.md) in one call on vLLM, SGLang, vLLM-Omni or llama.cpp, with your own engine flags, and get an endpoint behind its own key plus root SSH. For running other apps on a GPU box, see self-host anything with Docker. The full image reference is in [Images](/docs/images.html.md).

## Bring the container, rent the GPU

Paste a public image, or save a private one once, and run it on an [H100](/gpus/h100.html.md) from [the live price](/gpus/h100.html.md) per GPU-hour or an [RTX 4090](/gpus/rtx-4090.html.md) from [the live price](/gpus/rtx-4090.html.md). [Add your image in the console](/console/#/images).

New here? Use code [FIRST25](/console/?code=FIRST25) for $25 off your first deposit of $50 or more, until 31 December 2026.

## Rent the GPUs in this post

- [H100](/gpus/h100.html.md): [the live price](/gpus/h100.html.md) per GPU-hour now; rent in the console (/console/#/gpus?gpu_type=H100) or with the MCP tool rent_gpu.
- [RTX 4090](/gpus/rtx-4090.html.md): [the live price](/gpus/rtx-4090.html.md) per GPU-hour now; rent in the console (/console/#/gpus?gpu_type=RTX 4090) or with the MCP tool rent_gpu.
- [L40S](/gpus/l40s.html.md): [the live price](/gpus/l40s.html.md) per GPU-hour now; rent in the console (/console/#/gpus?gpu_type=L40S) or with the MCP tool rent_gpu.
- [B200](/gpus/b200.html.md): [the live price](/gpus/b200.html.md) per GPU-hour now; rent in the console (/console/#/gpus?gpu_type=B200) or with the MCP tool rent_gpu.

## Questions

**Can I run my own Docker image on a rented GPU?** Yes. Any public image works and is checked with its registry before you pay. A private one works once you save it with a read-only registry login.

**Which registries work for private images?** Docker Hub, GitHub (ghcr.io), Amazon ECR, Google Artifact Registry and gcr.io, Azure, NVIDIA NGC, GitLab, Quay, and your own registry if it answers on the public internet over HTTPS with a publicly trusted certificate.

**Do I need to install SSH in my image?** No. SSH is added to any image at start, so you log in as root the same way. The image needs a shell and a linux/amd64 build.

**Where should secrets go?** Not in the image and not in its saved environment variables. Set them over SSH once the machine runs, for example export HF_TOKEN in your session.

## More from the blog

- [AI Startup GPU Budget: The First Six Months, No Idle Burn](/blog/ai-startup-gpu-budget.html.md): An AI startup GPU budget for the first six months: a prepaid balance as the ceiling, a spend cap per token, removal times, and no GPUs billing while idle.
- [GPU price per GB: the metric that matters, from live prices](/blog/gpu-price-per-gb-memory.html.md): GPU price per GB of memory, from live hourly prices: the formula, a table for ten GPUs, break-even ratios, a one-line script, and when the metric misleads.
- [FLUX.2 GPU Guide: Image Generation as Your Own Endpoint](/blog/flux-2-qwen-image-gpu.html.md): FLUX.2 GPU needs: FLUX.2-klein-9B takes about 42 GB, one L40S; Qwen-Image 70 GB, one A100. Deploy either on vLLM-Omni and pay by the hour, not per image.

Every post: [/blog](/blog.html.md). RSS: [/blog/feed.xml](/blog/feed.xml).
