-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerFile
More file actions
30 lines (23 loc) · 1.11 KB
/
ContainerFile
File metadata and controls
30 lines (23 loc) · 1.11 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
28
29
30
FROM debian:13
LABEL description "Build zig examples" \
maintainer="Sazerac4 <lm-embeddedsystems@laposte.net>"
RUN mkdir -vp /opt/tools
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update --fix-missing && apt upgrade -y
#Install tools
RUN apt install --no-install-recommends -y xz-utils ca-certificates curl make stlink-tools openocd
#Install GCC
ARG GCC_VERSION="14.2.1-1.1"
RUN cd /tmp && curl -L -o arm-none-eabi-gcc.tar.gz https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v${GCC_VERSION}/xpack-arm-none-eabi-gcc-${GCC_VERSION}-linux-x64.tar.gz \
&& tar -xf arm-none-eabi-gcc.tar.gz -C /opt/tools/ \
&& ln -s /opt/tools/xpack-arm-none-eabi-gcc-*/bin/arm-none-eabi-* /usr/local/bin/
#Install Zig
ARG ZIG_VERSION="0.15.1"
RUN cd /tmp && curl -L -o zig.tar.xz https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz \
&& tar -xf zig.tar.xz -C /opt/tools/ \
&& ln -s /opt/tools/zig-x86_64-linux-*/zig /usr/local/bin/
#Clean image
RUN apt clean && rm -rf -- /var/lib/apt/lists/* && rm -rf -- /tmp/*
WORKDIR /workspace
VOLUME /workspace
CMD [ "/bin/bash" ]