-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
38 lines (27 loc) · 939 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ailispaw/ubuntu-essential:16.04-nodoc
ENV TERM xterm
RUN apt-get -q update && \
apt-get -q -y install --no-install-recommends ca-certificates \
bc build-essential cpio file git python unzip rsync wget && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Setup environment
ENV SRC_DIR=/build \
BR_ROOT=/build/buildroot
RUN mkdir -p ${SRC_DIR}
ENV BR_VERSION 2022.05
RUN wget -qO- https://buildroot.org/downloads/buildroot-${BR_VERSION}.tar.xz | tar xJ && \
mv buildroot-${BR_VERSION} ${BR_ROOT}
# Apply patches
COPY patches ${SRC_DIR}/patches
RUN for patch in ${SRC_DIR}/patches/*.patch; do \
patch -p1 -d ${BR_ROOT} < ${patch}; \
done
# Copy extra packages
COPY extra ${SRC_DIR}/extra
# Copy the empty config file
COPY empty.config ${BR_ROOT}/.config
# Copy the build script file
COPY build.sh ${SRC_DIR}/build.sh
VOLUME ${BR_ROOT}/dl ${BR_ROOT}/ccache
WORKDIR ${BR_ROOT}
CMD ["../build.sh"]