Add initial CentOS 3.9 root filesystem structure and essential scripts
- Created default user environment files: .bash_logout, .bash_profile, and .bashrc. - Added symbolic links for dynamic linker and various libraries. - Included essential binaries in /sbin for system management (e.g., fdisk, mkfs, hwclock). - Implemented RPM verification script to check availability of required packages in CentOS vault. - Established basic directory structure for logs and mail. - Added a tarball for external libraries.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# Alternative Dockerfile using debootstrap approach
|
||||
# This version uses a more modern base and cross-compiles for legacy compatibility
|
||||
|
||||
FROM debian:oldstable AS builder
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget \
|
||||
rpm2cpio \
|
||||
cpio \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create workspace
|
||||
WORKDIR /build
|
||||
|
||||
# Download and extract CentOS 3.9 libstdc++.5 and essential libraries
|
||||
RUN mkdir -p rpms && cd rpms && \
|
||||
wget -q https://archive.kernel.org/centos-vault/3.9/os/i386/RedHat/RPMS/compat-libstdc++-7.3-2.96.122.i386.rpm && \
|
||||
wget -q https://archive.kernel.org/centos-vault/3.9/os/i386/RedHat/RPMS/libstdc++-3.2.3-47.3.i386.rpm
|
||||
|
||||
# Extract libraries
|
||||
RUN cd rpms && \
|
||||
for rpm in *.rpm; do rpm2cpio "$rpm" | cpio -idmv; done
|
||||
|
||||
# Final stage - minimal runtime
|
||||
FROM debian:oldstable-slim
|
||||
|
||||
# Install minimal GCC toolchain compatible with old C++ libraries
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
make \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
m4 \
|
||||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \
|
||||
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy extracted libstdc++.5 from builder
|
||||
COPY --from=builder /build/rpms/usr/lib/libstdc++.so.5* /usr/lib/i386-linux-gnu/
|
||||
|
||||
# Set up PFEXTLIB directory
|
||||
WORKDIR /usr/local/PFEXTLIB-1.2
|
||||
ENV PREFIX=/usr/local/PFEXTLIB-1.2
|
||||
ENV LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu:$LD_LIBRARY_PATH
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user