-
Notifications
You must be signed in to change notification settings - Fork 5
/
Containerfile
46 lines (38 loc) · 1.28 KB
/
Containerfile
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
# Download ARM GCC
FROM ubuntu:22.04 as gcc-arm
ARG ARM_GCC_VERSION=10.3-2021.10
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends \
bzip2 \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN ARCH=$(uname -m) \
URL="https://developer.arm.com/-/media/Files/downloads/gnu-rm/${ARM_GCC_VERSION}/gcc-arm-none-eabi-${ARM_GCC_VERSION}-${ARCH}-linux.tar.bz2" \
&& mkdir gcc-arm \
&& wget -qO- "$URL" | tar xj --strip-components=1 -C gcc-arm
# Main stage
FROM ubuntu:24.04
COPY --from=gcc-arm /gcc-arm /gcc-arm
ENV PATH="/gcc-arm/bin:$PATH"
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends \
bash-completion \
doxygen \
git \
libncurses6 \
nano \
openocd \
openssh-client \
python3-pip \
python-is-python3 \
sudo \
&& rm -rf /var/lib/apt/lists/*
# Create symlinks for old GCC compilers
RUN cd /usr/lib/x86_64-linux-gnu \
&& ln -s libncurses.so.6.4 libncurses.so.5 \
&& ln -s libtinfo.so.6.4 libtinfo.so.5
# Install tools (user-space)
USER ubuntu
# --break-system-packages is fine because we are not installing these through apt
RUN pip3 install lbuild pyelftools modm scons==3.1.2 --break-system-packages