OpenWrt Build image with testing features
188
This is a docker container needed for test and build OpenWRT images different versions.
Officialy supperts the following versions:
OpenWRT 18.xx
OpenWRT 19.xx
OpenWRT 21.xx
OpenWRT 22.xx
OpenWRT 23.xx
For your convinience may be used several approaches for run a container with image
This approach assume that you want to build image locally from Dockerfile using the following commands:
# Build in detached mode
docker build -t docker-openwrt-build .
# Run in interactive mode
docker run -it --name openwrt-build_container docker-openwrt-build
This approach assume that you can get actual image through Docker Hub using the following commands:
# Pull the image wit desired version
docker image pull borchevkin/openwrt-build:1.0.0
# Run the image in interactive mode
docker run -it --name openwrt-build_container borchevkin/openwrt-build:1.0.0
When using this docker image for build sometimes (actually always for speed up builds) will be better to mount folder and clone and build OpenWRT on your host machine.
For this you can use several approaches.
As example, you can create docker-compose.yml with the similar configuration:
version: "3.9"
services:
builder:
build: .
volumes:
- type: bind
source: ./
target: /host
- type: bind
source: ~/.ssh
target: /root/.ssh
working_dir: /host
tty: true
You can run composer with the following command:
docker compose up
As example, run a container with the following options:
docker run -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/known_hosts:/root/.ssh/known_hosts -v "$PWD":/host -w /host -d -i -t --name docker-openwrt-build_container docker-openwrt-build
Press on keyboard sequentally Ctrl+P Ctrl+Q.
# Or
update-alternatives --set g++ /usr/bin/g++-9
update-alternatives --set gcc /usr/bin/gcc-9
# Or
update-alternatives --set g++ /usr/bin/g++-10
update-alternatives --set gcc /usr/bin/gcc-10
# Or
update-alternatives --set g++ /usr/bin/g++-11
update-alternatives --set gcc /usr/bin/gcc-11
Use the following:
python3 -v
python2.7 -v
sudo su -c "setenforce 0"
# Create access token and login into docker from CLI
docker login -u <your username>
# Build image
docker build -t docker-openwrt-build .
# Tag the image
docker image tag docker-openwrt-build borchevkin/openwrt-build:latest
# Push the image
docker image push borchevkin/openwrt-build:latest
Content type
Image
Digest
sha256:39088f619…
Size
924.9 MB
Last updated
about 2 years ago
docker pull borchevkin/openwrt-build