Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-feliks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feliks Kiszkurno
ogs-feliks
Commits
d72518dc
Commit
d72518dc
authored
6 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[Jenkins] GCC Dockerfile created with ogs-container-maker@c3dc13e.
parent
dd4b44d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/docker/Dockerfile.gcc.full
+102
-55
102 additions, 55 deletions
scripts/docker/Dockerfile.gcc.full
with
102 additions
and
55 deletions
scripts/docker/Dockerfile.gcc.full
+
102
−
55
View file @
d72518dc
FROM ubuntu:17.10
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y curl \
RUN apt-get update -y && \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
&& apt-get update && apt-get -y install \
wget \
ccache \
tar \
g++-6 \
curl && \
git git-lfs \
rm -rf /var/lib/apt/lists/*
python3-pip \
sudo \
unzip
ENV CC=gcc-6
# GNU compiler
ENV CXX=g++-6
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
gcc-6 \
g++-6 \
gfortran-6 && \
rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc $(which gcc-6) 30 && \
update-alternatives --install /usr/bin/g++ g++ $(which g++-6) 30 && \
update-alternatives --install /usr/bin/gfortran gfortran $(which gfortran-6) 30 && \
update-alternatives --install /usr/bin/gcov gcov $(which gcov-6) 30
RUN python3 -m pip install --upgrade pip \
# OGS base building block
&& python3 -m pip install cmake conan>=1.10.0
# Python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
libpython3-dev && \
rm -rf /var/lib/apt/lists/*
# pip
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
# CMake version 3.13.4
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
wget && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.13/cmake-3.13.4-Linux-x86_64.sh && \
/bin/sh /var/tmp/cmake-3.13.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
rm -rf /var/tmp/cmake-3.13.4-Linux-x86_64.sh
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:git-core/ppa -y && \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
git-lfs \
make \
ninja-build \
doxygen && \
rm -rf /var/lib/apt/lists/*
RUN git lfs install && \
mkdir -p /apps /scratch /lustre /work /projects
# Ninja
# Package manager Conan building block
RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \
# pip
&& unzip ninja-linux.zip \
RUN apt-get update -y && \
&& mv ninja /usr/local/bin/ninja \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
&& rm ninja-linux.zip
python3-pip \
python3-setuptools \
python3-wheel && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install conan==1.12.2
RUN mkdir -p /opt/conan && \
chmod 777 /opt/conan
ENV CONAN_USER_HOME=/opt/conan
LABEL org.opengeosys.pm=conan \
org.opengeosys.pm.conan.user_home=/opt/conan \
org.opengeosys.pm.conan.version=1.12.2
# Add user jenkins to the image
# CVode version 2.8.2
RUN adduser --uid 500 --disabled-password --gecos "" jenkins \
# Add user jenkins to sudoers with NOPASSWD
&& echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
# Set password for the jenkins user (you may want to alter this).
&& echo "jenkins:jenkins" | chpasswd
USER jenkins
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/ufz/cvode/archive/2.8.2.tar.gz && \
ENV CCACHE_DIR=/home/jenkins/cache/ccache
mkdir -p /var/tmp && tar -x -f /var/tmp/2.8.2.tar.gz -C /var/tmp -z && \
RUN mkdir -p $CCACHE_DIR
mkdir -p /var/tmp/build && cd /var/tmp/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/cvode -DEXAMPLES_INSTALL=OFF -DBUILD_SHARED_LIBS=OFF /var/tmp/cvode-2.8.2 && \
ENV CCACHE_MAXSIZE=15G
cmake --build /var/tmp/build --target install -- -j$(nproc) && \
ENV CCACHE_SLOPPINESS=pch_defines,time_macros
rm -rf /var/tmp/2.8.2.tar.gz /var/tmp/build /var/tmp/cvode-2.8.2
WORKDIR /home/jenkins
ENV CVODE_ROOT=/usr/local/cvode
RUN conan user
### END gcc.minimal ###
USER root
RUN apt-get update && apt-get install -y \
# cppcheck version 1.83
biber \
clang-tidy \
doxygen \
graphviz \
libxml2-utils \
python-dev
# Include-what-you-use
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/danmar/cppcheck/archive/1.83.tar.gz && \
RUN curl https://include-what-you-use.org/downloads/include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -O \
mkdir -p /var/tmp && tar -x -f /var/tmp/1.83.tar.gz -C /var/tmp -z && \
&& tar xf include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -C /usr/ --strip-components=1 \
mkdir -p /var/tmp/build && cd /var/tmp/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/cppcheck -DCMAKE_BUILD_TYPE=RELEASE /var/tmp/cppcheck-1.83 && \
&& rm include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz
cmake --build /var/tmp/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/1.83.tar.gz /var/tmp/build /var/tmp/cppcheck-1.83
# cppcheck
ENV PATH=/usr/local/cppcheck/bin:$PATH
RUN curl -L -o 1.86.tar.gz https://github.com/danmar/cppcheck/archive/1.86.tar.gz \
&& tar xf 1.86.tar.gz \
&& cd cppcheck-1.86 \
&& make SRCDIR=build CFGDIR=/usr/share/cppcheck/ CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" \
&& make install CFGDIR=/usr/share/cppcheck/ \
&& cd .. && rm -r cppcheck-1.86 1.86.tar.gz
RUN apt-get install -y mesa-common-dev libgl1-mesa-dev libxt-dev wget
# Jenkins node
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
graphviz \
texlive-base \
sudo && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1001 jenkins && \
adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \
echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "jenkins:jenkins" | chpasswd
USER jenkins
USER jenkins
WORKDIR /home/jenkins
RUN mkdir -p /home/jenkins/cache/ccache
ENV CCACHE_DIR=/home/jenkins/cache/ccache \
CCACHE_MAXSIZE=15G \
CCACHE_SLOPPINESS=pch_defines,time_macros
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment