Skip to content

Commit

Permalink
sonarcloud refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Melky-Phoe committed Sep 25, 2024
1 parent 72c95cc commit 496a3ca
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 31 deletions.
11 changes: 3 additions & 8 deletions example/docker/debian12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN echo root:1234 | chpasswd

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential binutils lsb-release make git libssl-dev openssh-server wget patchelf software-properties-common flex && \
binutils build-essential flex git libssl-dev lsb-release make openssh-server patchelf software-properties-common && \
rm -rf /var/lib/apt/lists/*

RUN git clone --depth=1 --single-branch --branch=releases/gcc-13.2.0 git://gcc.gnu.org/git/gcc.git /gcc && \
Expand All @@ -18,16 +18,11 @@ RUN cd /gcc/objdir && \
make -j$(nproc) && \
make install

RUN wget "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.sh" -O cmake.sh && \
chmod +x cmake.sh && \
ADD "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.sh" cmake.sh
RUN chmod +x cmake.sh && \
./cmake.sh --skip-license --prefix=/usr/local && \
rm ./cmake.sh

RUN apt-get update && \
apt-get purge -y \
wget && \
rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/cmakelib/cmakelib.git /cmakelib
RUN echo "export CMLIB_DIR=/cmakelib" >> /root/.bashrc && \
echo "export CC=/usr/local/bin/gcc" >> /root/.bashrc && \
Expand Down
12 changes: 4 additions & 8 deletions example/docker/fedora40/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ RUN echo root:1234 | chpasswd

RUN dnf -y update && \
dnf -y install \
make automake gcc gcc-c++ kernel-devel binutils lsb-release git openssl-devel openssh-server wget patchelf

RUN wget "https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3-linux-x86_64.sh" -O cmake.sh && \
chmod +x cmake.sh && \
automake binutils gcc gcc-c++ git kernel-devel lsb-release make openssh-server openssl-devel patchelf
ADD "https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3-linux-x86_64.sh" cmake.sh
RUN chmod +x cmake.sh && \
./cmake.sh --skip-license --prefix=/usr/local && \
rm ./cmake.sh

RUN dnf -y update && \
dnf -y remove \
wget

RUN git clone https://github.com/cmakelib/cmakelib.git /cmakelib
RUN echo "export CMLIB_DIR=/cmakelib" >> /root/.bashrc

Expand Down
8 changes: 4 additions & 4 deletions example/docker/fleet-os-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ RUN echo root:1234 | chpasswd
#
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential xz-utils sed git libssl-dev openssh-server wget unzip python3 make patchelf && \
build-essential xz-utils sed git libssl-dev openssh-server unzip python3 make patchelf && \
rm -rf /var/lib/apt/lists/*

RUN wget "https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-linux-x86_64.sh" -O cmake.sh && \
chmod +x cmake.sh && \
ADD "https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-linux-x86_64.sh" cmake.sh
RUN chmod +x cmake.sh && \
./cmake.sh --skip-license --prefix=/usr/local && \
rm ./cmake.sh

Expand All @@ -33,7 +33,7 @@ COPY uname.txt /root/tools/

RUN apt-get update && \
apt-get purge -y \
wget unzip && \
unzip && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/usr/sbin/sshd", "-D", "-o", "ListenAddress=0.0.0.0"]
6 changes: 3 additions & 3 deletions example/docker/ubuntu1804-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ RUN echo root:1234 | chpasswd

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential make libssl-dev coreutils lsb-release wget g++-8 gcc-8 gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu patchelf unzip openssh-server git && \
build-essential coreutils g++-8 g++-8-aarch64-linux-gnu gcc-8 gcc-8-aarch64-linux-gnu git libssl-dev lsb-release make openssh-server patchelf unzip && \
rm -rf /var/lib/apt/lists/*

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8

RUN wget "https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0-linux-x86_64.sh" -O cmake.sh && \
chmod +x cmake.sh && \
ADD "https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0-linux-x86_64.sh" cmake.sh
RUN chmod +x cmake.sh && \
./cmake.sh --skip-license --prefix=/usr/local && \
rm ./cmake.sh

Expand Down
18 changes: 10 additions & 8 deletions example/docker/ubuntu2404/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ RUN echo root:1234 | chpasswd

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
coreutils lsb-release build-essential openssh-server git libssl-dev wget patchelf && \
build-essential \
coreutils \
git \
libssl-dev \
lsb-release \
openssh-server \
patchelf && \
rm -rf /var/lib/apt/lists/*

RUN wget "https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3-linux-x86_64.sh" -O cmake.sh && \
chmod +x cmake.sh && \
ADD "https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3-linux-x86_64.sh" cmake.sh
RUN chmod +x cmake.sh && \
./cmake.sh --skip-license --prefix=/usr/local && \
rm ./cmake.sh

RUN apt-get purge -y \
wget && \
rm -rf /var/lib/apt/lists/*


RUN git clone https://github.com/cmakelib/cmakelib.git /cmakelib
RUN echo "export CMLIB_DIR=/cmakelib" >> /root/.bashrc

Expand Down

0 comments on commit 496a3ca

Please sign in to comment.