From 055245fdc19e94680dfa80ac6c83d58ae3ccbfe9 Mon Sep 17 00:00:00 2001 From: AlekseyZhmulin Date: Mon, 25 Mar 2024 17:52:46 +0300 Subject: [PATCH] Merge emdocker and emdocker-test images --- Dockerfile | 70 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9fd27ce..c780cf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,39 @@ -FROM embox/emdocker as build +FROM debian:bookworm +MAINTAINER Anton Kozlov +# Container utils RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + sudo \ + iptables \ + openssh-server \ + iproute2 \ + bzip2 \ + unzip \ + xz-utils \ + python2 \ + python3 \ + curl \ + make \ + patch \ + cpio \ + gcc-multilib \ + g++-multilib \ + gdb \ + qemu-system \ + ruby \ + bison \ + flex \ + bc \ + autoconf \ + pkg-config \ + mtd-utils \ + ntfs-3g \ + autotools-dev \ + automake \ + xutils-dev \ + libtool \ nfs-kernel-server \ nfs-common \ samba \ @@ -18,17 +49,45 @@ RUN apt-get update && \ expect \ snmp \ xvfb \ - xvnc4viewer \ ffmpeg \ git \ dosfstools && \ apt-get clean && \ rm -rf /var/lib/apt /var/cache/apt +## arm crosscompiler +## NOTE use insecure connection (-k) to avoid troubles with outdated local certificates +## another option is to update certificates (i.e. from https://curl.haxx.se/docs/caextract.html) and provide the file with --cacert +RUN curl -k -L "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2" | \ + tar -jxC /opt + +## aarch64 crosscompiler +RUN curl -k -L "https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-elf.tar.xz" | \ + tar -xJC /opt + ## risc-v crosscompiler RUN curl -k -L -s "https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.2.0-2019.05.3-x86_64-linux-ubuntu14.tar.gz" | \ tar -xzC /opt +## other crosscompilers +RUN for a in microblaze mips powerpc sparc; do \ + curl -k -L "https://github.com/embox/crosstool/releases/download/2.42-13.2.0-14.2/$a-elf-toolchain.tar.bz2" | \ + tar -jxC /opt; \ + done + +# COPY create_matching_user.sh /usr/local/sbin/ +# COPY docker_start.sh /usr/local/sbin/ + +# COPY id_rsa.pub /home/user/.ssh/authorized_keys +# COPY user.bashrc /home/user/.bashrc +# COPY user.bash_profile /home/user/.bash_profile +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# x86/test/fs +RUN for i in $(seq 0 9); do \ + mknod /dev/loop$i -m0660 b 7 $i; \ + done + # x86/test/fs nfs RUN mkdir -p -m 777 /var/nfs_test COPY exports /etc/ @@ -44,11 +103,6 @@ COPY ntp.conf /etc/ RUN useradd -u 65534 -o -ms /bin/bash rlogin_user RUN /bin/echo -e "rlogin\nrlogin" | passwd rlogin_user -FROM scratch -MAINTAINER Anton Kozlov - -COPY --from=build / / - ENV PATH=$PATH:\ /opt/gcc-arm-none-eabi-6-2017-q2-update/bin:\ /opt/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin:\ @@ -66,5 +120,3 @@ CMD mount -t tmpfs none /var/nfs_test && \ /etc/init.d/ntp restart && \ inetd && \ /usr/local/sbin/docker_start.sh - -