• ...
  • base images
  • SDK
  • ...
  • ...
  • tools
  • premade packages

Local container registry#

Prerequisites#

  • Linux host (Ubuntu 20.04+ recommended)

  • docker-compose and docker installed on your system. See here for details

Create a local registry#

With a docker-compose file like

# SPDX-FileCopyrightText: (C) 2022 Avnet Embedded GmbH
# SPDX-License-Identifier: LicenseRef-Avnet-OSS-1.0
version: '3'

services:
  registry:
    image: registry:2
    ports:
    - "5000:5000"

run

$ docker-compose up -d

from the folder, which creates a local registry on port 5000

Push an image to the local registry#

  • pull the image you need

  • tag the image

  • push the image

$ image=<name>
$ docker pull $image
$ docker tag $image localhost:5000/$image
$ docker push localhost:5000/$image

Enable the device#

  • on your computer, get the registry IP :

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
 inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
 inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
2: ETH0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
   link/ether 11:22:33:44:55:66 brd ff:ff:ff:ff:ff:ff
   inet 192.168.1.2/24 metric 100 brd 192.168.1.255 scope global dynamic enp5s0
      valid_lft 78205sec preferred_lft 78205sec
  • on the device

$ container-helper registry-install --unsecure <registry ip>:5000 <image name>:<tag>
$ simpleswitch-helper start simpleswitch-app@<image name>