93bd2954f4
These are flat but not generated by lcitool so we need to manually update them with the `useradd` stanza. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230228190653.1602033-20-alex.bennee@linaro.org>
33 lines
1.1 KiB
Docker
33 lines
1.1 KiB
Docker
#
|
|
# Docker cross-compiler target
|
|
#
|
|
# This docker target uses prebuilt toolchains for LoongArch64 from:
|
|
# https://github.com/loongson/build-tools/releases
|
|
#
|
|
FROM docker.io/library/debian:11-slim
|
|
|
|
# Duplicate deb line as deb-src
|
|
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
|
|
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
ca-certificates \
|
|
curl \
|
|
gettext \
|
|
git \
|
|
python3-minimal
|
|
|
|
RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2022.05.29/loongarch64-clfs-5.0-cross-tools-gcc-glibc.tar.xz \
|
|
| tar -xJC /opt
|
|
|
|
ENV PATH $PATH:/opt/cross-tools/bin
|
|
ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH
|
|
# As a final step configure the user (if env is defined)
|
|
ARG USER
|
|
ARG UID
|
|
RUN if [ "${USER}" ]; then \
|
|
id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
|