How to Register Docker Images

Learn how to register your custom Docker images to AIBOX

Contents

1

Introduction

AIBOX OS comes with a pre-installed Docker Image that can run YOLO11 with NCNN by default.

docker images
REPOSITORY TAG SIZE aicap/arm64/ultralytics 1.0.250923 3.43GB

This image is based on the YOLO11 image published by Ultralytics, with additional modules installed for NCNN conversion and execution, as well as environment setup for running aicap commands. This allows basic detection programs using YOLO11 to run on AIBOX OS within containers launched from this image.

GitHub View Dockerfile here

The standard built-in AI detection program runs using this image.

However, registering your own custom Docker images to AIBOX requires some specific steps.

This guide explains the necessary procedures.

2

Docker Won't Start with RAM Disk

AIBOX OS uses RAM disk for all directories except /home, but Docker cannot start when RAM disk is enabled.

To address this issue, AIBOX OS performs the following steps during OS startup to launch Docker:

  1. Stop docker.service temporarily
  2. Mount /var/lib/docker to tmpfs
  3. Copy contents from /var/lib/docker.persist to /var/lib/docker
  4. Start docker.service
Hint

This startup process only occurs when RAM disk is enabled.
When RAM disk is disabled, Docker starts normally without any special processing.

In other words, when RAM disk is enabled, the information is overwritten with images and other data stored in /var/lib/docker.persist.
Therefore, when creating and registering custom Docker images, you need to save the created information to /var/lib/docker.persist.

3

How to Register Custom Docker Images

To register your custom Docker image to AIBOX OS, follow these steps:

  1. Disable RAM disk
  2. Build the image and register it to the local repository
  3. Save the current local repository information to /var/lib/docker.persist
  4. Enable RAM disk

After disabling RAM disk, you can perform normal image builds and register them to the local repository. However, to use the registered images after enabling RAM disk again, you must save the current local repository information to /var/lib/docker.persist.

A script for this save operation is provided by default. After registering your image, execute the following script (sudo required):

Script
$ sudo /usr/local/aicap/script/docker/dockersave.sh

Running this script will save the current Docker information (this may take some time).
After the script completes, enable RAM disk.
After reboot, if your registered image appears in docker images, you're done!