Pre provisionning local docker images with Torizoncore builder

Hi,

I’m trying to Pre-provisioning docker Containers on a docker image. It works successfully in most of the cases when I use docker images available on Docker hub, but I struggle to use local images.

Here is an extract of my docker-compose.yml file.

  local_image:
    cap_add:
    - SYS_RAWIO
    container_name: local_image
    depends_on: {}
    device_cgroup_rules:
    - c 1:1 rmw
    devices:
    - /dev/gpiochip0
    - /dev/gpiochip1
    - /dev/gpiochip2
    - /dev/gpiochip3
    - /dev/gpiochip4
    - /dev/gpiochip5
    - /dev/gpiochip6
    image: local_image:1.0
    ports:
    - 4999:4999/tcp
    - 47867:47867/udp
    - 47868:47868/udp
    volumes:
    - /dev/mem:/dev/mem:rw
    - /home/torizon:/home/torizon:rw

This image exists locally on my computer.

But when I run “torizoncore-builder build”, I meet this error :

Starting DIND container
Using Docker host "tcp://127.0.0.1:22376"
Connecting to Docker Daemon at "tcp://127.0.0.1:22376"
Fetching container image local_image:1.0
Stopping DIND container
Removing output directory 'image' due to build errors
Error: Error: container images download failed: 404 Client Error for https://127.0.0.1:22376/v1.40/images/create?tag=1.0&fromImage=local_image&platform=linux%2Farm%2Fv7: Not Found ("pull access denied for local_image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")

does it exists any solution to my issue ? It’s important for me to be independant from docker hub.

Thank you in advance.

Best regards,
rfonck

Hi @rfonck !

The error states: repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

I know that it is a local image, but have you tried to build with TorizonCore Builder after using docker login?

Best regards,

Hi @henrique.tx,

I just tried again after running the "docker login command but it still don’t work. I have the same error message :

Starting DIND container
Using Docker host "tcp://127.0.0.1:22376"
Connecting to Docker Daemon at "tcp://127.0.0.1:22376"
Fetching container image local_image:1.0
Stopping DIND container
Removing output directory 'image' due to build errors
Error: Error: container images download failed: 404 Client Error for https://127.0.0.1:22376/v1.40/images/create?tag=1.0&fromImage=local_image&platform=linux%2Farm%2Fv7: Not Found ("pull access denied for local_image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")

Best regards,
rfonck

When you say “local” image do you mean local as in the image only exists on your PC, or local as in it’s located in a local container registry on your PC?

In the first case, any container you bundle needs to be in some kind of container registry. Whether it be Docker Hub or something else. If it’s the second case, then you need to specify the alternative registry in the image field of your docker-compose file.

Best Regards,
Jeremias

Hi,

the image is not on a registery but exists only on my computer.

Thank you for your answer.

Best regards,
rfonck

Glad I was able to help clarify.