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

Local container registry#

For advanced users

The following paragraphs are for advanced users only. If you are unfamiliar with docker or SimpleSwitch™ packages yet, it is advised to skip the following

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> # e.g. simpleswitch-filebrowser
TAG=<tag> # e.g. latest
docker pull $IMAGE:$TAG
docker tag $IMAGE:$TAG localhost:5000/$IMAGE:$TAG
docker push localhost:5000/$IMAGE:$TAG

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

IMAGE=<name> # name as pushed to the registry in the prior step
TAG=<tag> # tag as pushed to the registry in the prior step
container-helper registry-install --unsecure <registry ip>:5000 $IMAGE::$TAG
simpleswitch-helper start simpleswitch-app@$IMAGE