GNS3 Docker Images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
1.3 KiB

#!/bin/sh
set -e
LIB_DIR=/libc-i386
# install debian i386 libraries
dpkg --add-architecture i386
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y install libssl1.1:i386
# copy i386 libraries
mkdir -p "$LIB_DIR/lib/i386-linux-gnu"
cp -a /lib/ld-linux.so.2 "$LIB_DIR/lib/"
cp -a /lib/i386-linux-gnu/ld* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /lib/i386-linux-gnu/libc[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /lib/i386-linux-gnu/libdl[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /lib/i386-linux-gnu/libgcc_s[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /lib/i386-linux-gnu/libm[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /lib/i386-linux-gnu/libnsl[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /lib/i386-linux-gnu/libpthread[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
cp -a /usr/lib/i386-linux-gnu/libcrypto[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
ln -s libcrypto.so.1.1 "$LIB_DIR/lib/i386-linux-gnu/libcrypto.so.4"
# include copyright files
DOC_DIR=$LIB_DIR/usr/share/doc/libc-i386
for pkg in gcc-8-base libc6 libssl1.1; do
mkdir -p "$DOC_DIR/$pkg"
cp -a "/usr/share/doc/$pkg/copyright" "$DOC_DIR/$pkg/"
done
# store in tar archive
echo
echo "Storing i386 libs into libc-i386.tar.gz..."
echo
tar -cvvzf /base/libc-i386.tar.gz -C "$LIB_DIR" $(cd $LIB_DIR; echo lib/* usr/share/doc/*)
chown --reference=/base /base/libc-i386.tar.gz