[OpenWrt-Devel] [RFC] additional Docker images and CI testing

Ted Hess owrt at kitschensync.net
Sun Jun 2 12:31:38 EDT 2019

Hi Paul -

This sounds like a good idea - would giving you commit 
access to our
docker hub [0] repo be of any help? Is there anything else I 
could help with?

I don't know if you saw this posting I made last year about 
a simple
use of our Docker image for test buiilds. Issue #7735 [1]. I 
had pinned it
but for some reason @heil un-pinned it and I left it be.


[0]: https://hub.docker.com/u/openwrtorg
[1]: https://github.com/openwrt/packages/issues/7735

-----Original Message----- 
From: Paul Spooren
Sent: Saturday, June 01, 2019 10:26 AM
To: openwrt-devel at lists.openwrt.org
Cc: Etienne Champetier ; Ted Hess ; Rosen Penev
Subject: [OpenWrt-Devel] [RFC] additional Docker images and 
CI testing

Hi all,

currently OpenWrt only offers a very basic Docker image[0] 
for testing
of the packages.git repo. The image is not directly usable 
as the CI
does most of the work, like setting up the SDK and adding 
feeds[1]. I'd
like to propose two additional images and added CI test 
examples for
illustration, `openwrt` and `openwrt-sdk`

## openwrt:x86-64

Now that OpenWrt can run within Docker containers[2] (thanks 
@dangowrt and @ynezz) it's possible for local or CI tests:

* Running the image locally:

    docker run --rm -it aparcar/openwrt:x86-64

* Test example via CircleCI

Checks if procd starts basic services[3].

The container image is created via a config.yml similar to 
the one from

## openwrt-sdk:x86-64

The OpenWrt SDK in a Docker container, also usable for local 
building or CI:

* Using the SDK locally

    docker run --rm -v ./bin/:/sdk/bin -it 
    # within the Docker container
    ./scripts/feeds update base
    make defconfig
    ./scripts/feeds install firewall
    make package/firewall/{clean,compile} -j$(nproc)

The compiled output is found in ./bin/

* Test example via CircleCI

Compiles firewall package[5].

The openwrt-sdk container image is also created via CI[6].

All examples are based on this[7] repo and the *interesting* 
branches are:

* openwrt
* openwrt-test
* openwrt-sdk
* openwrt-sdk-test

I'd be happy if OpenWrt offers OS, SDK and ImageBuilder 
container images
in the future. Currently only the x86/64 target is 
supported, however
it'd be easy to support all (popular) targets via tags.

Eventually we could use this to develop test cases for 
OpenWrt specific
tools like netifd, procd, ubus, firewall3, etc...


[0]: https://hub.docker.com/r/openwrtorg/packages-cci
[7]: https://github.com/aparcar/openwrt-ci-test

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list