/
Dockerfile.gcc.gui
131 lines (119 loc) · 4.63 KB
/
Dockerfile.gcc.gui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
FROM ubuntu:18.04
# Generated with ogs-container-maker 1.2.0
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
tar \
wget && \
rm -rf /var/lib/apt/lists/*
# GNU compiler
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ \
gcc && \
rm -rf /var/lib/apt/lists/*
# OGS base building block
# Python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python \
python-dev \
python3 \
python3-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 virtualenv
# 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 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 && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y dirmngr --install-recommends && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157 && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
git lfs install && \
mkdir -p /apps /scratch /lustre /work /projects /data
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxt-dev \
mesa-common-dev && \
rm -rf /var/lib/apt/lists/*
# Package manager Conan building block
# 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 conan==1.17.0
RUN mkdir -p /opt/conan && \
chmod 777 /opt/conan
ENV CONAN_USER_HOME=/opt/conan
LABEL org.opengeosys.pm=conan \
org.opengeosys.pm.conan.version=1.17.0
LABEL org.opengeosys.pm.conan.user_home=/opt/conan
# cppcheck version 1.87
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/danmar/cppcheck/archive/1.87.tar.gz && \
mkdir -p /var/tmp && tar -x -f /var/tmp/1.87.tar.gz -C /var/tmp -z && \
mkdir -p /var/tmp/build && cd /var/tmp/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local/cppcheck -DCMAKE_BUILD_TYPE=RELEASE /var/tmp/cppcheck-1.87 && \
cmake --build /var/tmp/build --target install -- -j$(nproc) && \
rm -rf /var/tmp/1.87.tar.gz /var/tmp/build /var/tmp/cppcheck-1.87
ENV PATH=/usr/local/cppcheck/bin:$PATH
# 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 gcovr
# Package manager Conan building block
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ccache && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/cache && chmod 777 /opt/cache
ENV CCACHE_DIR=/opt/cache \
CCACHE_MAXSIZE=15G \
CCACHE_SLOPPINESS=pch_defines,time_macros
LABEL ccache.dir=/opt/cache \
ccache.size=15G
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo && \
rm -rf /var/lib/apt/lists/*
# Jenkins node
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openssh-client \
rsync && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1001 jenkins || true && \
adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \
echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "jenkins:jenkins" | chpasswd
USER jenkins
WORKDIR /home/jenkins