-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (57 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
64 lines (57 loc) · 1.48 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM ubuntu:bionic
RUN \
export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y \
bash \
bc \
binutils \
bison \
build-essential \
bzip2 \
cpio \
file \
flex \
g++ \
gcc \
git \
gzip \
libncurses5-dev \
make \
python3 \
rsync \
tar \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/*
# Use the latest stable release.
# See <https://buildroot.org/download.html>.
RUN \
git clone https://gitlab.com/buildroot.org/buildroot.git \
--branch 2023.02.x\
--single-branch \
--depth=1 \
/buildroot
WORKDIR /buildroot
# Apply patches.
# The patch changes `Makefile` to always use `/output` as `O`.
# See the following comment why we can't use `/buildroot/output`.
COPY patches /buildroot/patches
RUN \
GIT_COMMITTER_NAME=patches \
GIT_COMMITTER_EMAIL=patches@example.com \
git am patches/*.patch \
&& rm -rf patches
# Due to the implementation of Builroot `kconfig` which is using
# `rename(2)`, using Docker volume at `/buildroot/output` will fail with
# "Invalid cross-device link" error, when it moves config file
# from `/buildroot` to `/buildroot/output`.
#
# The cause is not obvious, and `make` is mostly silently failed with
# "Error during update of the configuration." message.
#
# This is not happening for the out of tree build because all files are
# placed in the output directory which is in the same volume.
VOLUME /output
VOLUME /buildroot/dl
CMD ["/bin/bash"]