FROM registry.u-bordeaux.fr/vhub/alpine:3.18 # ajouter des répertoires pour avoir plus de paquets dispos RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ apk update # outils Linux RUN apk add wget curl ca-certificates openjdk17-jre zip unzip git vim # paquets dev C RUN apk add bash make gcc g++ clang cmake doxygen musl-dev openmpi openmpi-dev openssh RUN apk add clang-extra-tools cppcheck gcovr lcov valgrind vera++ # paquets dev Python RUN apk add python3 py3-matplotlib py3-numpy py3-pytest py3-coverage py3-build py3-twine py3-flake8 py3-pylint py3-pip RUN python3 -m pip install --break-system-packages lcov_cobertura scan-build # rats RUN apk add expat-dev RUN wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rough-auditing-tool-for-security/rats-2.4.tgz && \ tar -xzvf rats-2.4.tgz && cd rats-2.4 && ./configure && make && make install && rm /rats-2.4.tgz # vera report RUN git clone https://github.com/SonarOpenCommunity/sonar-cxx.git /opt/sonar-cxx && \ chmod +x /opt/sonar-cxx/cxx-sensors/src/tools/vera++Report2checkstyleReport.perl && \ ln -s /opt/sonar-cxx/cxx-sensors/src/tools/vera++Report2checkstyleReport.perl /usr/local/bin/vera++Report2checkstyleReport.perl # sonar-scanner ENV SONAR_SCANNER_VERSION="6.1.0.4477" RUN mkdir -p /opt && \ curl -fSL https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip -o /opt/sonar-scanner.zip && \ unzip /opt/sonar-scanner.zip -d /opt && \ rm /opt/sonar-scanner.zip && \ ln -s /opt/sonar-scanner-${SONAR_SCANNER_VERSION}/bin/sonar-scanner /usr/bin/sonar-scanner && \ sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /opt/sonar-scanner-${SONAR_SCANNER_VERSION}/bin/sonar-scanner # Create a group and user RUN addgroup -S gitlab && adduser -S gitlab -G gitlab # Create a directory where ci jobs are performed RUN mkdir /builds && \ chown -R gitlab:gitlab /builds && \ chmod g+s /builds # default user USER gitlab # default working directory WORKDIR /builds