Skip to content

Commit

Permalink
Clean Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksejZhmulin committed Apr 2, 2024
1 parent 76214db commit 7b13d76
Showing 1 changed file with 5 additions and 38 deletions.
43 changes: 5 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ RUN apt-get update && \
cpio \
build-essential \
binutils \
binutils-arm-none-eabi \
binutils-riscv64-unknown-elf \
gcc \
gcc-arm-none-eabi \
gcc-riscv64-unknown-elf \
gcc-multilib \
g++-multilib \
gdb \
Expand All @@ -51,24 +47,18 @@ RUN apt-get update && \
rpcbind \
nfs-kernel-server \
nfs-common \
samba \
mkisofs \
net-tools \
isc-dhcp-server \
iputils-ping \
telnet \
ntp \
openbsd-inetd \
psmisc \
wget \
expect \
snmp \
xvfb \
xauth \
tigervnc-standalone-server \
tigervnc-common \
tigervnc-viewer \
ffmpeg \
git \
mime-support \
dosfstools && \
Expand All @@ -77,45 +67,22 @@ RUN apt-get update && \
rm /etc/apt/sources.list.d/bullseye.list

## Install crosscompilers
RUN for a in aarch64 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" | \
RUN for a in aarch64-elf arm-none-eabi microblaze-elf mips-elf powerpc-elf riscv64-unknown-elf sparc-elf; do \
curl -k -L "https://github.com/embox/crosstool/releases/download/2.42-13.2.0-14.2/$a-toolchain.tar.bz2" | \
tar -jxC /opt; \
done

## Set environment variables
ENV PATH=$PATH:\
/opt/aarch64-elf-toolchain/bin:\
/opt/arm-none-eabi-toolchain/bin:\
/opt/microblaze-elf-toolchain/bin:\
/opt/mips-elf-toolchain/bin:\
/opt/powerpc-elf-toolchain/bin:\
/opt/riscv64-unknown-elf-toolchain/bin:\
/opt/sparc-elf-toolchain/bin

## Allow members of group sudo to execute any command
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/

## x86/test/fs cifs
RUN mkdir -p -m 777 /var/cifs_test
COPY smb.conf.public /etc/samba/
RUN cat /etc/samba/smb.conf.public >> /etc/samba/smb.conf && \
rm /etc/samba/smb.conf.public

## x86/test/net
COPY dhcpd.conf /etc/dhcp/
COPY isc-dhcp-server /etc/default/
COPY ntp.conf /etc/

CMD mount -t tmpfs none /var/nfs_test && \
systemctl restart rpcbind && \
systemctl restart nfs-kernel-server && \
systemctl restart nmbd && \
systemctl restart smbd && \
systemctl restart ntp && \
systemctl restart inetd
CMD [""]

0 comments on commit 7b13d76

Please sign in to comment.