From d876323952295a319c4588dd9c9d3f08a2625f89 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Tue, 4 Jul 2023 16:57:52 +0300 Subject: [PATCH] Improve Dockerfile: - fully parametrize downloads, - move env parameters down after apt packages install, - add python3-distutils for building without buildbot. --- .buildbot/openwrt/Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.buildbot/openwrt/Dockerfile b/.buildbot/openwrt/Dockerfile index 6088b5b..953f9cf 100644 --- a/.buildbot/openwrt/Dockerfile +++ b/.buildbot/openwrt/Dockerfile @@ -1,27 +1,28 @@ FROM ubuntu:focal -ENV OPENWRT_VERSION=22.03.2 -ENV OPENWRT_TARGET=bcm27xx -ENV OPENWRT_DEVICE=bcm2711 -ENV OPENWRT_CC=gcc-11.2.0_musl - RUN apt -y update RUN DEBIAN_FRONTEND=noninteractive TZ=UTC \ apt -yq install \ build-essential rsync git-core subversion mercurial libssl-dev \ libncurses5-dev unzip gawk zlib1g-dev libncursesw5-dev zlib1g-dev \ - gettext xsltproc wget unzip python + gettext xsltproc wget unzip python python3-distutils + +# Board build parameters +ENV OPENWRT_VERSION=22.03.2 +ENV OPENWRT_TARGET=bcm27xx +ENV OPENWRT_DEVICE=bcm2711 +ENV OPENWRT_CC=gcc-11.2.0_musl RUN mkdir /Downloads RUN wget -qP /Downloads \ - "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-imagebuilder-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}.Linux-x86_64.tar.xz" + "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-imagebuilder-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}.Linux-x86_64.tar.xz" RUN wget -qP /Downloads \ - "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-sdk-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz" + "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-sdk-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz" # RUN wget -qP /Downloads \ -# "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-toolchain-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz" +# "https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/${OPENWRT_TARGET}/${OPENWRT_DEVICE}/openwrt-toolchain-${OPENWRT_VERSION}-${OPENWRT_TARGET}-${OPENWRT_DEVICE}_${OPENWRT_CC}.Linux-x86_64.tar.xz" ADD . .