-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerFile
More file actions
27 lines (22 loc) · 1.24 KB
/
Copy pathContainerFile
File metadata and controls
27 lines (22 loc) · 1.24 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
FROM fedora:44
LABEL description "Build zig examples" \
maintainer="Sazerac4 <lm-embeddedsystems@laposte.net>"
#Install tools
RUN yum install --setopt=install_weak_deps=False -y curl xz ca-certificates git cmake make ninja-build stlink openocd nodejs && yum clean all && rm -rf -- /var/cache/yum
#Install gcc-arm-none-eabi (https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads)
ARG GCC_VERSION="15.2.rel1"
RUN curl -L -o gcc-arm-none-eabi.tar.xz https://developer.arm.com/-/media/Files/downloads/gnu/${GCC_VERSION}/binrel/arm-gnu-toolchain-${GCC_VERSION}-x86_64-arm-none-eabi.tar.xz \
&& mkdir -vp /opt/tools/gcc-arm-none-eabi \
&& tar xf gcc-arm-none-eabi.tar.xz -C /opt/tools/gcc-arm-none-eabi --strip-components 1 --checkpoint=1000 --checkpoint-action=dot --totals \
&& ln -s /opt/tools/gcc-arm-none-eabi/bin/* /usr/local/bin/ \
&& rm gcc-arm-none-eabi.tar.xz
#Install Zig
ARG ZIG_VERSION="0.16.0"
RUN curl -L -o zig.tar.xz https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz \
&& mkdir -vp /opt/tools/ \
&& tar -xf zig.tar.xz -C /opt/tools/ \
&& ln -s /opt/tools/zig-x86_64-linux-*/zig /usr/local/bin/ \
&& rm zig.tar.xz
WORKDIR /workspace
VOLUME /workspace
CMD [ "/bin/bash" ]