-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (40 loc) · 1.16 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM debian:bullseye
# system base packages + build dependencies
RUN set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
nano bash ca-certificates openssh-client \
subversion g++ zlib1g-dev build-essential git python python3 \
rsync libncurses5-dev gawk gettext unzip file libssl-dev wget zip time \
bison flex bc u-boot-tools gcc-aarch64-linux-gnu \
&& rm -rf /var/lib/apt/lists/*
# system users+paths
RUN set -xe \
&& useradd build \
&& mkdir /home/build \
&& mkdir /mnt/target /mnt/conf \
&& chmod 0777 /mnt/target \
&& chown build:build /home/build
# copy base fs
COPY fs/ /
# run as build user
USER build
# clone repo
RUN set -xe \
&& cd /home/build \
&& git clone git://git.denx.de/u-boot.git uboot
# checkout stable
ARG GIT_REVISION=v2022.04
# fetch branch/tag and update feeds ~100MB
RUN set -xe \
&& cd /home/build/uboot \
&& git checkout ${GIT_REVISION}
# config
RUN set -xe \
&& echo "source /mnt/conf/build.env" >> ~/.bashrc
# copy related configs
#COPY conf/ /home/build/conf
# working dir
WORKDIR /home/build/uboot
# start bash
ENTRYPOINT [ "/bin/bash" ]