Hello,
I am attempting to create a “production” image that combines our customised Torizon OS based image with our docker application using guidelines from this page: Pre-provisioning Docker Containers onto a Torizon OS image | Toradex Developer Center.
The goal is to have docker app “baked” into the image, so that no download is required.
Our docker app is in a private repository on docker hub.
Initially I used the bundle option in tcb.yaml file (excerpt below):
output:
ostree:
branch: "cabinet-fw-update"
commit-subject: "FW update package"
commit-body: ""
easy-installer:
local: output/custom-tcbuild-overlays-provisioning
autoinstall: true
autoreboot: true
accept-licence: true
provisioning:
mode: "online"
shared-data: "shared-data.tar.gz"
online-data: "***"
bundle:
compose-file: <sub-dir>/docker-compose.yml
username: <mylogin>
password: <docker_pat>
However, when i build the image with
torizoncore-builder build --file $TCBUILD_FILE
and then download the image on the board using Tezi, after the first boot it seems that docker-compose still pulls the docker images from the docker hub registry (e.g. I tested this by booting the board for the first time, and then cutting the network connection, which failed the docker-compose service, as it failed to connect to docker.io registry). But at least correct docker-compose file is on the image…
Next i tried the torizoncore builder workflow (2nd option in the webpage provided), but I fail to even create the bundle:
torizoncore-builder bundle docker-compose.yml --login <mylogin> <pat> --bundle-directory docker-bundle
Creating Docker Container bundle...
NOTE: TCB no longer expands environment variables present in the compose file.
Starting DIND container
Using Docker host "tcp://127.0.0.1:22376"
Connecting to Docker Daemon at "tcp://127.0.0.1:22376"
Attempting to log in to registry 'default' with username=<mylogin>
Fetching container image <repository>/<image-name>:2.2.0 in service <image-name>
Stopping DIND container
Error: container images download failed: 404 Client Error for https://127.0.0.1:22376/v1.40/images/<repository>/<image-name>:2.2.0/json: Not Found ("no such image: <repository>/<image-name>:2.2.0: No such image: <repository>/<image-name>:2.2.0")
It seems that the bundle command for some reason looks at my local registry instead of the docker hub registry?
i tried with --login-to hub.docker.com and some variations of that, all of which fail. I’m not really sure what i’m doing wrong…
Tools:
Board: Verdin AM62
torizoncorebuilder : 3.13
OS: Ubuntu 24.04.2 LTS
Tezi base image: torizon-docker-verdin-am62-Tezi_7.1.0+build.4.tar