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.
This commit is contained in:
2021-02-08 15:04:23 +00:00
parent c26800155e
commit 07d3c4acf5
2 changed files with 15 additions and 2 deletions

7
openwrt-builder-entry.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
[ -x /input.sh ] && /input.sh
cd /builder/openwrt && /usr/bin/screen "$@"
[ -x /output.sh ] && /output.sh

View File

@@ -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" ]