Docs / Apps
Use the container registry
5 minute read
The container registry keeps your private Docker images in Lagos, next to your apps. You create one registry for your organisation and choose its name; every image you push lives under it, as registry.simplicloud.ai/YOUR-NAME/IMAGE:TAG. Only your organisation can push or pull there.
1. Create your registry
Open Container registry in the console and choose Create registry (or Create, then Create a container registry). Pick:
| Setting | What to choose |
|---|---|
| Name | 3 to 63 lowercase letters, digits and hyphens, starting and ending with a letter or digit. Names are shared by everyone, so pick something specific, such as your company's name. A few words are reserved (library, admin, api and the like). |
| Plan | How much you can store and how many repositories you can have. You can change it later. |
| Region | Lagos (LOS1). |
Each organisation has one registry. From the terminal:
simplicloud registry create kora-foods --plan basic# kora-foods created: push to registry.simplicloud.ai/kora-foods/IMAGE:TAG
2. Sign in with Docker
The user name can be anything; the password is an API token with the Developer role or above (API, CLI & Terraform in the console). Viewer tokens can pull but not push. The CLI can sign Docker in with the token it already has.
docker login registry.simplicloud.ai -u token# Password: <your API token># or, with the CLI signed in:simplicloud registry login
3. Tag and push an image
Repositories are made on first push; you can nest them (kora-foods/team/api). Pushing a tag again replaces it.
docker build -t storefront:1.4 .docker tag storefront:1.4 registry.simplicloud.ai/kora-foods/storefront:1.4docker push registry.simplicloud.ai/kora-foods/storefront:1.4
The registry page lists each repository with its tags, digest, size and build date. Deleting a tag deletes the image it points at, and every other tag of the same image with it.
4. Deploy an image as an app
Choose Deploy next to a tag, or create an app with source Container image and pick SimpliCloud registry. SimpliCloud pulls the image for you with a short-lived credential: you don't store a password in the app.
simplicloud apps create storefront --image registry.simplicloud.ai/kora-foods/storefront:1.4 --plan basic
5. Push from CI
Store an API token as a secret, sign in, build and push, then call your app's deploy hook to roll the new image out.
- run: echo "$SC_TOKEN" | docker login registry.simplicloud.ai -u token --password-stdinenv: { SC_TOKEN: ${{ secrets.SIMPLICLOUD_TOKEN }} }- run: |docker build -t registry.simplicloud.ai/kora-foods/storefront:${{ github.sha }} .docker push registry.simplicloud.ai/kora-foods/storefront:${{ github.sha }}
6. Plans and limits
Each plan has a storage limit and a repository limit; the console shows them, with what you use, on the registry page. Storage counts every layer of every tagged image once, however many tags or repositories share it, and is measured every 10 minutes. Starter is ₦1,500, Basic ₦6,000 and Professional ₦24,000 a month (plus VAT), billed by the hour and capped at the monthly price. The console shows the current price before you create or change a plan.
When the registry is full, or a push would make a repository past the plan's limit, the push stops with a message saying why:
docker push registry.simplicloud.ai/kora-foods/worker:1# denied: The Starter plan allows 1 repository and kora-foods has 1. Push to an existing# repository, delete one in the console, or change to a bigger plan.
Pulls keep working and apps keep running and deploying. Delete old tags or move to a bigger plan to push again. Space from deleted images is reclaimed by a nightly clean-up between midnight and 1 a.m. Lagos time; the registry pauses for a minute or two while it runs.
7. Change plan, rename or delete
Under Settings on the registry page: change plan at any time (a smaller plan only if what you store fits it). The name can be changed only until you push the first image, because image names include it. Deleting the registry deletes every image in it and frees the name; you type the name to confirm. Apps already running keep running but can't redeploy from deleted images. Another organisation can take a deleted name after a day.
simplicloud registry getsimplicloud registry plan professionalsimplicloud registry delete kora-foods