arm-gcc-ci/Dockerfile

42 lines
1.3 KiB
Docker
Raw Normal View History

2023-09-14 09:59:45 +03:00
FROM debian:stable-slim
2023-09-12 22:53:40 +03:00
2023-10-26 19:30:23 +03:00
ARG VERSION=12.3.rel1
2023-09-22 17:35:21 +03:00
2023-10-26 22:26:02 +03:00
ENV ARCH_TAG="---"
2023-09-22 17:35:21 +03:00
RUN ARCH="$(dpkg --print-architecture)" && \
case $ARCH in \
"amd64") \
2023-10-26 19:30:23 +03:00
ARCH_TAG="x86_64" \
2023-09-22 17:35:21 +03:00
;; \
"arm64") \
2023-10-26 19:30:23 +03:00
ARCH_TAG="aarch64" \
2023-09-22 17:35:21 +03:00
;; \
esac && \
# Get nessecary packages
apt-get update && \
2023-09-13 13:16:42 +03:00
apt-get install \
2023-09-14 09:59:45 +03:00
--no-install-recommends \
make \
cmake \
2023-09-22 17:35:21 +03:00
wget \
ca-certificates \
2023-10-26 19:47:02 +03:00
xz-utils \
2023-09-13 13:16:42 +03:00
-y && \
2023-09-22 17:35:21 +03:00
rm -rf /var/cache/apt && \
mkdir /workdir && \
cd /workdir && \
2023-10-26 19:33:32 +03:00
wget https://developer.arm.com/-/media/Files/downloads/gnu/${VERSION}/binrel/arm-gnu-toolchain-${VERSION}-${ARCH_TAG}-arm-none-eabi.tar.xz && \
2023-10-26 19:30:23 +03:00
tar xvf arm-gnu-toolchain-${VERSION}-${ARCH_TAG}-arm-none-eabi.tar.xz && \
#wget https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v${VERSION}/xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz && \
#tar xvf xpack-arm-none-eabi-gcc-${VERSION}-linux-${ARCH_TAG}.tar.gz && \
rm arm-gnu-toolchain-${VERSION}-${ARCH_TAG}-arm-none-eabi.tar.xz
2023-09-12 22:53:40 +03:00
2023-10-26 21:51:01 +03:00
RUN echo 'export PATH="/workdir/arm-gnu-toolchain-'${VERSION}'-'${ARCH_TAG}'-arm-none-eabi/bin:$PATH"' >> /etc/bashrc
2023-09-22 17:35:21 +03:00
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
2023-09-12 22:53:40 +03:00
2023-09-22 17:35:21 +03:00
ENTRYPOINT [ "/entrypoint.sh" ]