-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.base
132 lines (119 loc) · 2.65 KB
/
Dockerfile.base
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Base Image (ci-base)
FROM ubuntu:22.04
ARG UID=1000
ARG GID=1000
# Set default shell during Docker image build to bash
SHELL ["/bin/bash", "-c"]
# Set non-interactive frontend for apt-get to skip any user confirmations
ENV DEBIAN_FRONTEND=noninteractive
# Install base packages
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install --no-install-recommends -y \
software-properties-common \
lsb-release \
autoconf \
automake \
bison \
build-essential \
ca-certificates \
ccache \
chrpath \
cmake \
cpio \
device-tree-compiler \
dfu-util \
diffstat \
dos2unix \
doxygen \
file \
flex \
g++ \
gawk \
gcc \
gcovr \
gdb \
git \
git-core \
gnupg \
gperf \
gtk-sharp2 \
help2man \
iproute2 \
lcov \
libcairo2-dev \
libglib2.0-dev \
libgtk2.0-0 \
liblocale-gettext-perl \
libncurses5-dev \
libpcap-dev \
libpopt0 \
libsdl1.2-dev \
libsdl2-dev \
libssl-dev \
libtool \
libtool-bin \
locales \
make \
net-tools \
ninja-build \
openssh-client \
parallel \
pkg-config \
python3-dev \
python3-pip \
python3-ply \
python3-setuptools \
python-is-python3 \
qemu \
rsync \
socat \
srecord \
sudo \
texinfo \
unzip \
valgrind \
wget \
ovmf \
xz-utils \
thrift-compiler
# Install multi-lib gcc (x86 only)
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \
apt-get install --no-install-recommends -y \
gcc-multilib \
g++-multilib \
; fi
# Install i386 packages (x86 only)
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \
dpkg --add-architecture i386 && \
apt-get -y update && \
apt-get -y upgrade && \
apt-get install --no-install-recommends -y \
libsdl2-dev:i386 libfuse-dev:i386 \
; fi
# Initialise system locale
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Install Python dependencies
RUN python3 -m pip install -U --no-cache-dir pip && \
pip3 install -U --no-cache-dir wheel setuptools && \
pip3 install --no-cache-dir pygobject && \
pip3 install --no-cache-dir \
-r https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/main/scripts/requirements.txt \
-r https://raw.githubusercontent.com/zephyrproject-rtos/mcuboot/main/scripts/requirements.txt \
GitPython imgtool junitparser numpy protobuf PyGithub \
pylint sh statistics west \
nrf-regtool>=5.3.0 && \
pip3 check
# Clean up stale packages
RUN apt-get clean -y && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Create 'user' account
RUN groupadd -g $GID -o user
RUN useradd -u $UID -m -g user -G plugdev user \
&& echo 'user ALL = NOPASSWD: ALL' > /etc/sudoers.d/user \
&& chmod 0440 /etc/sudoers.d/user
USER root