|José Moreira ac90b0e953 push latest sdk instead of 18.0.1||3 years ago|
|base-image||3 years ago|
|image-builder||3 years ago|
|package-builder||3 years ago|
|package-builder-precached||3 years ago|
|targets/18.0.1||3 years ago|
|.editorconfig||3 years ago|
|.travis.yml||3 years ago|
|README.md||3 years ago|
|docker-images-builder.sh||3 years ago|
Docker images for building packages and firmware files
OpenWRT Build System is really huge, and takes a lot of time to build up things, so in order to make it easier to other Devs to use it, the Build System outputs two other build systems: the OpenWRT Package Builder and the OpenWRT Image/Firmware Builder.
The Package Builder allows developers to build up a specific set of packages without having to build the entire packaging system. So this means that the developers just need to plug-in their Package Feeds and set which packages are meant to be built.
The Image Builder allows developers to build an Image/Firmware to deploy on their devices without having to build all the packages from scratch. This allows Continuous Delivery systems to be much more eficient since it is just installing packages into lean file-systems.
This project was developed this because of disadvantages found on legacy ones:
Setup - It takes some time to setup, and on Docker-based CI environments, if things aren’t cleared properly, error are introduced between build iterations.
Disk usage A full setup for a target takes a lot of space. It’s much more efficient to have a setup where there are ephemeral changes between build iterations, assuming caching of the initial setup, which can be achieved using docker.
There is a base image from where all the other images are based. This image is based on Debian and includes all the tools needed for the OpenWRT Builders.
/src - Builder Source
/feeds - folder to link custom feeds. The image detects mounted folders
automatically, so there’s no need to tell which feeds you want to build.
/overlay - folder with files and folders to overlay on the images root
/output - folder to output built images
.opkg files and a
docker run -ti --rm \ -e GOSU_USER=`id -u`:`id -g` \ -e PACKAGES="transmission openvpn node node-npm" \ -v /path/to/custom-packages-feed:/feeds/mypackages:z \ -v /path/to/output-dir:/output:z \ cusspvz/openwrt-builder:package-builder_18.0.1_brcm2708-bcm2710
Builds all the target images.
docker run -ti --rm \ -e GOSU_USER=`id -u`:`id -g` \ -e PACKAGES="-luci transmission openvpn node node-npm" \ -e CUSTOM_FEEDS="mypackages" \ -v /path/to/custom-packages-feed:/feeds/mypackages:z \ -v /path/to/overlay-dir:/overlay:z \ -v /path/to/output-dir:/output:z \ cusspvz/openwrt-builder:image-builder_18.0.1_brcm2708-bcm2710
Want to build your own images or help us out?
git clone https://github.com/cusspvz/openwrt-builder.docker openwrt-builder cd openwrt-builder/ DOCKER_USERNAME=yourusername ./docker-images-builder.sh
DOCKER_USERNAME variable is required so the builder can check which
images are already built and available on the registry. It also sets the image
DOCKER_USE_SUDO=1 FORCE=1 ./docker-images-builder.sh
Description: Shows all the underlaying command’s outputs
Description: List of versions and targets that are meant to be built by the
image builder. Each list item should contain each version and target concatened
with an underscore. [
Default: Defaults to all versions and targets
Description: This script checks if the images already exists on the registry. If this environment variable is set, it will always build and push all the version’s targets.
This should be used whenever there’s a change on the base image.
Description: If you need
sudo to run docker on your system, this should be
Description: This is needed in case you need to change your docker binary path.
Description: Sets the docker username in order to check if the image is already present on the registry. This also is used to prefix the image name.
Description: Allows to change the docker image name.
Note: If this needs to be altered, you still have to set
the caching check works properly. Unless you’re setting
Want to buy me a cup of coffee?
Thanks to jandelgado for his work on the docker builder and the docker compiler.
This exists thanks to: