From 07d3c4acf536b363f25189da2211f9de192afb10 Mon Sep 17 00:00:00 2001 From: Martin Kennedy Date: Mon, 8 Feb 2021 15:04:23 +0000 Subject: [PATCH] openwrt-builder: dockerfile for an openwrt builder This is a base builder -- it sets up *most* of the environment right and provides a great cache; later we can git pull again and check out the right commit, without needing to invalidate this builder and re-clone OpenWrt again. --- openwrt-builder-entry.sh | 7 +++++++ openwrt-builder.dockerfile | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 openwrt-builder-entry.sh diff --git a/openwrt-builder-entry.sh b/openwrt-builder-entry.sh new file mode 100755 index 0000000..9e12d46 --- /dev/null +++ b/openwrt-builder-entry.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +[ -x /input.sh ] && /input.sh + +cd /builder/openwrt && /usr/bin/screen "$@" + +[ -x /output.sh ] && /output.sh diff --git a/openwrt-builder.dockerfile b/openwrt-builder.dockerfile index b85cba9..4c22284 100644 --- a/openwrt-builder.dockerfile +++ b/openwrt-builder.dockerfile @@ -2,8 +2,14 @@ FROM builder USER buildbot -WORKDIR /builder/openwrt +WORKDIR /builder -RUN git clone https://git.laboratoryb.org/hurricos/openwrt-mirror --branch master . +RUN git clone https://git.laboratoryb.org/hurricos/openwrt-mirror --branch master openwrt +ENV openwrt_dir=/builder/openwrt +RUN cd ${openwrt_dir} && ./scripts/feeds update -a && ./scripts/feeds install -a + +COPY openwrt-builder-entry.sh /openwrt-builder-entry.sh + +ENTRYPOINT [ "/openwrt-builder-entry.sh" ]