-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (54 loc) · 1.88 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
52
53
54
55
56
57
58
59
60
61
################################################################
# First build stage: to download and unpack the arm toolchain.
################################################################
FROM ubuntu:24.04 AS arm-toolchain
RUN apt-get update -qq && apt-get install -y -qq \
curl \
patch \
xz-utils
# Get the arm-none-eabi toolchain directly from Arm. Along with gcc and linker,
# contains all libraries necessary for compile. It gets copied to the final
# image in the final build stage.
RUN mkdir -p arm-none-eabi && \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz" \
| tar --strip-components 1 -xJ -C arm-none-eabi
################################################################
# Final image for development
################################################################
FROM ubuntu:24.04
LABEL maintainer="[email protected]"
# After install, clean up the cache to reduce size of image.
# As a result, from within the container, will need to use apt-get update before
# any packages can be installed. Shouldn't be an issue, as all necessary
# packages should be installed here
RUN apt-get update && apt-get -y install \
sudo \
build-essential \
git \
vim \
bison \
flex \
texinfo \
libncurses-dev \
xxd \
gperf \
automake \
libtool \
pkg-config \
genromfs \
u-boot-tools \
util-linux \
kconfig-frontends \
usbutils \
gdb-multiarch=15.0.50.20240403-0ubuntu1 \
libusb-1.0-0-dev \
udev \
openocd \
&& rm -rf /var/lib/apt/lists/*
# This removes the password for sudo commands. The run command adds the user
# to the sudo group, but need to do this as well
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Grab the toolchain from the nuttx-toolchain-arm image and add to path.
COPY --from=arm-toolchain /arm-none-eabi/ /usr/bin/arm-none-eabi/
ENV PATH="/usr/bin/arm-none-eabi/bin:$PATH"
CMD [ "/bin/bash" ]