Cisco provides Docker base images and pre-built binary packages to make the IOx application development simple. These base images and binary packages are distributed on the DMZ type of repositories. This page will describe how to access these repositories and use the hosted artifacts (base image and binary packages).
Cisco hosted repositories:
The repositories can be accessed by following two ways:
Note:
$ docker logout devhub-docker.cisco.com
Removing login credentials for devhub-docker.cisco.com
$ cat ~/.docker/config.json
{
"auths": {
"devhub-docker.cisco.com": {
"auth": "aW94X2RvY2tlci5nZW46QUtDcDViQkN3TnBpcm9mM1FZS3NydW82dUE4cUh1ZXRFQ1U1NW9nYkpGUnBOejF2V2hXYXZRRjY4THdDU1dhZ1BXb1dQV1Jndg=="
}
}
}
after removing the entry
$ cat ~/.docker/config.json
{
"auths": {
}
}
RUN sed -i -e '/\(option http_auth\).*/d' -e "s/IOx-Opkg/iox-opkg/g" -e "s/IOx-Opkg-alpha/iox-opkg-alpha/g" /etc/opkg/opkg.conf
Platforms | Docker base image | Image Tags |
---|---|---|
IR8xxx/Cat9k/ISR4k/ASR1k/CGR1k | devhub-docker.cisco.com/iox-docker/ir800/base-rootfs | latest, 18.07, 18.06, yocto-1.7.2, yocto-2.1.1 |
devhub-docker.cisco.com/iox-docker/ir800/base-rootfs-dev | latest, 18.07 | |
devhub-docker.cisco.com/iox-docker/ir800/python-2.7.11 | latest, 18.07, 18.06 | |
devhub-docker.cisco.com/iox-docker/ir800/java-8 | latest, 18.07, 18.06 | |
devhub-docker.cisco.com/iox-docker/ir800/base-rootfs-32bit | latest, 18.07 | |
devhub-docker.cisco.com/iox-docker/ir800/base-rootfs-32bit-dev | latest, 18.07 | |
devhub-docker.cisco.com/iox-docker/ir800/python-2.7.11-32bit | latest, 18.07, 18.06 | |
devhub-docker.cisco.com/iox-docker/ir800/java-8-32bit | latest, 18.07, 18.06 | |
IE4000 | devhub-docker.cisco.com/iox-docker/ie4k/base-rootfs | latest, 18.07, 18.06 |
devhub-docker.cisco.com/iox-docker/ie4k/python-2.7.3 | latest, 18.07 | |
ap3k | devhub-docker.cisco.com/iox-docker/ap3k/base-rootfs | latest, 18.07 |
devhub-docker.cisco.com/iox-docker/ap3k/python-2.7.3 | latest, 18.07 | |
IR1101 | devhub-docker.cisco.com/iox-docker/ir1101/base-rootfs | latest, 19.03 |
devhub-docker.cisco.com/iox-docker/ir1101/base-rootfs-dev | latest, 19.03 | |
devhub-docker.cisco.com/iox-docker/ir1101/python-2.7.11 | latest, 19.03 |
Base Docker image: A minimal image that does not contain build or runtime tools. You can use this image as a starting point and install build tools or runtime tools to meet your requirements. Base Docker images are hosted in this format: Repo_Name/Platform/base-rootfs. For example, devhub-docker.cisco.com/iox-docker/ir800/base-rootfs.
Dev Docker image: This image contains widely used build tools. You can use this image to build and compile applications. These images are hosted in this format: *Repo_Name/Platform/*base-rootfs-dev. For example, devhub-docker.cisco.com/iox-docker/ir800/base-rootfs-dev.
Runtime Docker image: This image provides only a runtime environment for an app. You can choose the appropriate runtime image for your app. These images are hosted in this format:Repo_Name/Platform/Runtime-Runtime_Version. For example, devhub-docker.cisco.com/iox-docker/ir800/java-8
$ docker pull devhub-docker.cisco.com/iox-docker/ir800/base-rootfs
Using default tag: latest
latest: Pulling from iox-docker/ir800/base-rootfs
4f705e98c3ec: Pull complete
Digest: sha256:56efe29d9ea8a5aaaf24da77c184df816de0c1367badd7ed1910aa0e5dd45005
Status: Downloaded newer image for devhub-docker.cisco.com/iox-docker/ir800/base-rootfs:latest
Ex: docker pull devhub-docker.cisco.com/iox-docker/ir800/base-rootfs:18.07
Note: You can't push your docker images to the devhub repository
$ ls
cpp_app Dockerfile
$ cat Dockerfile
FROM devhub-docker.cisco.com/iox-docker/ir800/base-rootfs
COPY cpp_app /opt/apps/
RUN opkg update
RUN opkg install libstdc++
$ docker build -t cpp-app .
Step 1/4 : FROM devhub-docker.cisco.com/iox-docker/ir800/base-rootfs
---> 94665494b79f
Step 2/4 : COPY cpp_app /opt/apps/
---> 5039fc6d5e41
Removing intermediate container 0da1d6ceb277
Step 3/4 : RUN opkg update
---> Running in 6e9504d94077
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-2.1.1/ir800/core2-64/Packages.gz.
Updated source 'packages'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-2.1.1/ir800/ir800_lxc/Packages.gz.
Updated source 'ir800_lxc'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-2.1.1/all/Packages.gz.
Updated source 'all'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg-alpha/yocto-2.1.1/ir800/core2-64/Packages.gz.
Updated source 'packages_alpha'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg-alpha/yocto-2.1.1/ir800/ir800_lxc/Packages.gz.
Updated source 'ir800_lxc_alpha'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg-alpha/yocto-2.1.1/all/Packages.gz.
Updated source 'all_alpha'.
---> 27ac64d1ffd0
Removing intermediate container 6e9504d94077
Step 4/4 : RUN opkg install libstdc++
---> Running in c232cccb0646
Installing libstdc++6 (5.3.0-r0) on root.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-2.1.1/ir800/core2-64/libstdc++6_5.3.0-r0_core2-64.ipk.
Installing libgcc1 (5.3.0-r0) on root.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-2.1.1/ir800/core2-64/libgcc1_5.3.0-r0_core2-64.ipk.
Configuring libgcc1.
Configuring libstdc++6.
---> 2a520f6ef848
Removing intermediate container c232cccb0646
Successfully built 2a520f6ef848
$
In the above example, new image is created using cisco base image 'devhub-docker.cisco.com/iox-docker/ir800/base-rootfs' where c++ application binary 'cpp_app' copied and runtime environment for c++ is installed. For more information refer this tutorial: c++ based simple app
$ cat Dockerfile
FROM devhub-docker.cisco.com/iox-docker/ie4k/base-rootfs
COPY cpp_app /opt/apps/
RUN opkg update
RUN opkg install libstdc++
$docker build -t cpp-app .
Sending build context to Docker daemon 2.56kB
Step 1/4 : FROM devhub-docker.cisco.com/iox-docker/ie4k/base-rootfs
---> 162e8a8f6a82
Step 2/4 : COPY cpp_app /opt/apps/
---> 900c8ccee3b3
Removing intermediate container 3be06762c1ea
Step 3/4 : RUN opkg update
---> Running in 435f6a7b1b6c
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-1.7.2/ie4k/464/Packages.gz.
Updated source 'packages'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-1.7.2/ie4k/ie4k_lxc/Packages.gz.
Updated source 'ie4k_lxc'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-1.7.2/all/Packages.gz.
Updated source 'all'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg-alpha/yocto-1.7.2/ie4k/464/Packages.gz.
Updated source 'packages_alpha'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg-alpha/yocto-1.7.2/ie4k/ie4k_lxc/Packages.gz.
Updated source 'ie4k_lxc_alpha'.
Downloading https://devhub.cisco.com/artifactory/iox-opkg-alpha/yocto-1.7.2/all/Packages.gz.
Updated source 'all_alpha'.
---> 3b517e16f730
Removing intermediate container 435f6a7b1b6c
Step 4/4 : RUN opkg install libstdc++
---> Running in 88a3202a802c
Installing libstdc++6 (4.9.1-r0) on root.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-1.7.2/ie4k/464/libstdc++6_4.9.1-r0_464.ipk.
Installing libgcc1 (4.9.1-r0) on root.
Downloading https://devhub.cisco.com/artifactory/iox-opkg/yocto-1.7.2/ie4k/464/libgcc1_4.9.1-r0_464.ipk.
Configuring libgcc1.
Configuring libstdc++6.
---> 4e24bc7da981
Removing intermediate container 88a3202a802c
Successfully built 4e24bc7da981
Successfully tagged cpp-app:latest
Direct link to the repository:
OR
Top level directory contains distro specific packages. Look for folder named yocto-{version}.
Second level of directories (Ex. all, ap3k, ie4k etc.) except 'all' contains platform specific packages. The 'all' directory contains platform independent packages.
Under platform specific directory, packages are further divided between cpu architecture specific directory and platform directory.
Ex.: For the platform ap3k packages are divided in the following two directories: