This how-to is a step-by-step guide to create a simple docker container which can run on IOx on IE3400.
Unlike Catalyst 9300, which has a x86 (more specifically: x86-64) compatible CPU, IE3400 runs IOx apps on an ARM Cortex-A53 CPU. Therefor, any docker containers which are supposed to run on IE3400 need to have all binaries compiled for the aarch64 architecture.
One easy way to create such docker containers on a x86 Workstation/Server is to use qemu for CPU emulation.
Ubuntu 19.10 (but 18.04 or more recent versions should also work)
thulsdau@ubuntu1:~$ docker run --rm aarch64/alpine uname -m Unable to find image 'aarch64/alpine:latest' locally latest: Pulling from aarch64/alpine e92c575fea6b: Pull complete Digest: sha256:fea6984b3a5b422c41f20a95ff290e77405dd3cb4ff163dd3ad64572e41de0cf Status: Downloaded newer image for aarch64/alpine:latest aarch64 $
2. Create Dockerfile
Setup a new empty directory and create a file called "Dockerfile" with contents as shown below:
thulsdau@ubuntu1:~$ mkdir iperf3_dockerimage thulsdau@ubuntu1:~$ cd iperf3_dockerimage/ thulsdau@ubuntu1:~/iperf3_dockerimage$ cat <<EOF >Dockerfile > FROM aarch64/alpine:latest > RUN apk add --update --no-cache ca-certificates iperf3 tcpdump > EXPOSE 5201/tcp > USER root > CMD iperf3 -s > EOF thulsdau@ubuntu1:~/iperf3_dockerimage$ cat Dockerfile FROM aarch64/alpine:latest RUN apk add --update --no-cache ca-certificates iperf3 tcpdump EXPOSE 5201/tcp USER root CMD iperf3 -s thulsdau@ubuntu1:~/iperf3_dockerimage$
In this example we are basing the container on Alpine Linux, because of its small size. We are installing iperf3 and tcpdump as additional applications. And because a container needs a long-running process to stay alive, we have it execute the command "iperf3 -s" by default.