Initial setup
The point of this is to separate dockerfiles and build them on top of each other wherever possible. Then we can build them interdependently with makefiles!
This commit is contained in:
commit
fc6902981c
11
Makefile
Normal file
11
Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
#.PHONY: built/%.sentinel
|
||||
|
||||
docker_src = /devel/docker
|
||||
${docker_src}/built/%.sentinel: ${docker_src}/%.dockerfile
|
||||
grep -e '^FROM' "$*".dockerfile | awk '{print $$2}' \
|
||||
| tr : _ | xargs -I{} $(MAKE) ${docker_src}/built/{}.sentinel;
|
||||
cd ${docker_src}; docker build -f $< --tag $* .;
|
||||
touch $@;
|
||||
|
||||
${docker_src}/built/debian_10.sentinel:
|
||||
docker pull "debian:10" && touch $@;
|
||||
8
builder-entry.sh
Normal file
8
builder-entry.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
chown buildbot:buildbot /builder
|
||||
|
||||
cd /builder
|
||||
|
||||
/usr/sbin/gosu buildbot /usr/bin/screen "$@"
|
||||
|
||||
7
builder-start.sh
Normal file
7
builder-start.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -x /input.sh ] && /input.sh
|
||||
|
||||
/bin/bash
|
||||
|
||||
[ -x /output.sh ] && /output.sh
|
||||
43
builder.dockerfile
Normal file
43
builder.dockerfile
Normal file
@ -0,0 +1,43 @@
|
||||
FROM debian:10
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
USER root
|
||||
|
||||
RUN echo 'deb http://deb.debian.org/debian testing main' \
|
||||
> /etc/apt/sources.list.d/testing.list && \
|
||||
apt-get update && \
|
||||
apt-get install -t buster -y \
|
||||
pwgen \
|
||||
locales \
|
||||
build-essential \
|
||||
git-core \
|
||||
subversion \
|
||||
libncurses5-dev \
|
||||
gawk \
|
||||
unzip \
|
||||
pv \
|
||||
gosu \
|
||||
signify-openbsd \
|
||||
python3 \
|
||||
wget \
|
||||
curl \
|
||||
ccache \
|
||||
emacs \
|
||||
screen \
|
||||
rsync && \
|
||||
apt-get clean && \
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
|
||||
ENV LANG=en_US.utf8
|
||||
|
||||
COPY builder-entry.sh /entry.sh
|
||||
COPY builder-start.sh /start.sh
|
||||
|
||||
RUN mkdir /builder && \
|
||||
useradd --home /builder --shell /bin/bash buildbot && \
|
||||
chown buildbot:buildbot /builder && \
|
||||
chmod 0755 /entry.sh /start.sh
|
||||
|
||||
ENTRYPOINT [ "/entry.sh" ]
|
||||
CMD [ "/start.sh" ]
|
||||
9
openwrt-builder-commit.dockerfile
Normal file
9
openwrt-builder-commit.dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM openwrt-builder
|
||||
|
||||
ARG commit
|
||||
|
||||
RUN git pull origin master
|
||||
|
||||
RUN git checkout ${commit}
|
||||
|
||||
|
||||
9
openwrt-builder.dockerfile
Normal file
9
openwrt-builder.dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM builder
|
||||
|
||||
USER buildbot
|
||||
|
||||
WORKDIR /builder/openwrt
|
||||
|
||||
RUN git clone https://git.laboratoryb.org/hurricos/openwrt-mirror --branch master .
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user