woshikid/centos

By woshikid

Updated 12 days ago

CentOS + tools

Image
Operating Systems
0

131

7
FROM centos:7
ENV LANG=en_US.UTF-8
RUN echo -e "\nHISTCONTROL=ignoredups:ignorespace\nalias ls='ls --color=auto'\nalias ll='ls -alF'\nalias grep='grep --color=auto'" >> /root/.bashrc
RUN sed -i "s/keepcache=0/keepcache=1/" /etc/yum.conf
RUN --mount=type=cache,target=/var/cache/yum yum install -y epel-release && sed -i -e "s/metalink=/#metalink=/g" -e "s/#baseurl/baseurl/g" /etc/yum.repos.d/epel*
RUN --mount=type=cache,target=/var/cache/yum yum install -y which net-tools bind-utils telnet nmap-ncat strace tcpdump iproute libfaketime lsof iftop
RUN echo "alias faketime='LD_PRELOAD=/usr/lib64/faketime/libfaketime.so.1 FAKETIME_DONT_RESET=1 FAKETIME_XRESET=1'" >> /root/.bashrc
8
FROM centos:8
ENV LANG=C.UTF-8
RUN echo -e "\nHISTCONTROL=ignoredups:ignorespace\nalias ls='ls --color=auto'\nalias ll='ls -alF'\nalias grep='grep --color=auto'" >> /root/.bashrc
RUN sed -i -e "s/mirrorlist=/#mirrorlist=/g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
RUN echo "keepcache=true" >> /etc/dnf/dnf.conf
RUN --mount=type=cache,id=centos-8,target=/var/cache/dnf yum install -y epel-release libmodulemd && sed -i -e "s/metalink=/#metalink=/g" -e "s/#baseurl/baseurl/g" -e "s|https://download.example|http://download.fedoraproject.org|g" /etc/yum.repos.d/epel*
RUN --mount=type=cache,id=centos-8,target=/var/cache/dnf yum install -y which net-tools bind-utils telnet nmap-ncat strace tcpdump libfaketime lsof iftop
RUN echo "alias faketime='LD_PRELOAD=/usr/lib64/faketime/libfaketime.so.1 FAKETIME_DONT_RESET=1 FAKETIME_XRESET=1'" >> /root/.bashrc
latest
FROM quay.io/centos/centos:stream9
ENV LANG=C.UTF-8
RUN echo -e "\nHISTCONTROL=ignoredups:ignorespace\nalias ls='ls --color=auto'\nalias ll='ls -alF'\nalias grep='grep --color=auto'" >> /root/.bashrc
RUN echo "keepcache=true" >> /etc/dnf/dnf.conf
RUN --mount=type=cache,id=centos-9,target=/var/cache/dnf yum install -y epel-release && sed -i -e "s/metalink=/#metalink=/g" -e "s/#baseurl/baseurl/g" -e "s|https://download.example|http://download.fedoraproject.org|g" /etc/yum.repos.d/epel* && sed -i "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel-cisco-openh264.repo 2>/dev/null
RUN --mount=type=cache,id=centos-9,target=/var/cache/dnf yum install -y which hostname iputils net-tools bind-utils telnet nmap-ncat strace tcpdump iproute procps libfaketime lsof iftop
RUN echo "alias faketime='LD_PRELOAD=/usr/lib64/faketime/libfaketime.so.1 FAKETIME_DONT_RESET=1 FAKETIME_XRESET=1'" >> /root/.bashrc

Docker Pull Command

docker pull woshikid/centos