-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
313 lines (273 loc) · 12.7 KB
/
Dockerfile
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# Image for build GitHub Pull Requests for OpenDDS
FROM amd64/ubuntu:18.10 AS dev-platform
MAINTAINER "Adrien H."
LABEL description="Env for developping c++ application"
LABEL Version="0.1.1"
LABEL Vendor="Sloggy Botom"
LABEL Homepage="https://gitlab..../github/...whatever"
LABEL HowToUseIt="<docker run -d -p 8888:80 imagename> or after repository cloning: <docker-compose up --no-recreate>"
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ARG IMAGE_VERSION
ENV IMAGE_VERSION ${IMAGE_VERSION:-0.0.1}
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends perl \
gpg git xz-utils unzip wget curl openssh-server openssh-client libtool\
apt-transport-https \
ca-certificates \
software-properties-common \
# libcurl4-openssl-dev libcurl4-gnutls-dev libcurl4-nss-dev libgl1-mesa-dev \
libassimp-dev libfontconfig1 libdbus-1-3 \
bison flex build-essential gawk libgcrypt20-dev libcrypto++-dev \
python-dev python3-dev python-wheel cython cython3 python3-wheel \
perl-base perl-modules \
libxml2-dev libxml2-utils python3-setuptools python-setuptools \
libgnutls28-dev libcurl4-gnutls-dev libgnutls-openssl27 \
mesa-common-dev libglu1-mesa-dev libpcap-dev libglib2.0-dev libssl1.0-dev \
libfontconfig libldap2-dev libldap-2.4-2 libmysql++-dev \
unixodbc-dev libgdbm-dev libodb-pgsql-dev libcrossguid-dev uuid-dev libossp-uuid-dev \
libghc-uuid-dev libghc-uuid-types-dev ruby ruby-dev libelf-dev elfutils libelf1 \
libpulse-dev make gcc-8 g++-8 nfs-common \
&& apt-get --assume-yes --quiet clean \
&& apt-get --assume-yes --quiet autoremove \
&& apt-get autoclean --assume-yes \
&& rm /var/lib/apt/lists/* -r \
&& rm -rf /usr/share/man/*
RUN mkdir -pv /opt/cmake \
&& wget -qO- "https://cmake.org/files/v3.13/cmake-3.13.2-Linux-x86_64.tar.gz" \
| tar --strip-components=1 -xz -C /opt/cmake
ENV PATH $PATH:/opt/cmake/bin
RUN cd /home && export PATH=$PATH:/opt/cmake/bin && cmake --version \
&& git clone --depth=1 https://github.com/uncrustify/uncrustify.git \
&& cd uncrustify \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rvf uncrustify
RUN cd /home && export PATH=$PATH:/opt/cmake/bin && cmake --version \
&& git clone --depth=1 https://github.com/danmar/cppcheck.git \
&& cd cppcheck \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cp --recursive --verbose cfg /usr/local/bin || true \
&& cd /home \
&& rm -rvf cppcheck
RUN cd /home && export PATH=$PATH:/opt/cmake/bin && cmake --version \
&& git clone --depth=1 https://github.com/doxygen/doxygen.git \
&& cd doxygen \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rvf doxygen
RUN cd /home && export PATH=$PATH:/opt/cmake/bin && cmake --version \
&& git clone --depth=1 https://github.com/google/googletest.git \
&& cd googletest \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rvf googletest
RUN cd /home && export PATH=$PATH:/opt/cmake/bin && cmake --version \
&& git clone --depth=1 https://github.com/google/benchmark.git \
&& cd benchmark \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rvf benchmark
RUN cd /home && make --version \
&& curl -L -O -k https://www-us.apache.org/dist/apr/apr-1.6.5.tar.gz \
&& tar -xvzf apr-1.6.5.tar.gz > /dev/null \
&& cd apr-1.6.5 \
&& ./configure --prefix=/usr/ --enable-threads --enable-posix-shm \
--enable-allocator-guard-pages --enable-pool-concurrency-check --enable-other-child \
&& make clean && make && make install \
&& cd /home \
&& rm -rvf apr-1.6.5.tar.gz apr-1.6.5
RUN cd /home && export PATH=$PATH:/opt/cmake/bin && cmake --version \
&& git clone --depth=1 https://github.com/libexpat/libexpat.git \
&& cd libexpat/expat \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rvf libexpat
RUN cd /home && make --version \
&& curl -L -O -k https://www-us.apache.org/dist//apr/apr-util-1.6.1.tar.gz \
&& tar -xvzf apr-util-1.6.1.tar.gz > /dev/null \
&& cd apr-util-1.6.1 \
&& ./configure --prefix=/usr/ --with-apr=/usr/ --with-expat=/usr/ \
&& make clean && make && make install \
&& cd /home \
&& rm -rvf apr-util-1.6.1.tar.gz apr-util-1.6.1
RUN cd /home && make --version \
&& git clone --depth=1 https://gitbox.apache.org/repos/asf/logging-log4cxx.git \
&& cd logging-log4cxx \
&& ./autogen.sh \
&& ./configure --prefix=/usr/ --with-apr=/usr/ --with-apr-util=/usr/ \
--enable-char --enable-wchar_t --with-charset=utf-8 --with-logchar=utf-8 \
&& make clean && make && make install \
&& cd /home \
&& rm -rvf logging-log4cxx
# Download boost, untar, setup install with bootstrap and only do the Program Options library,
# and then install
RUN cd /home \
&& curl -L -O -k https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz \
&& tar xfz boost_1_69_0.tar.gz > /dev/null \
&& cd boost_1_69_0 \
&& ./bootstrap.sh --prefix=/usr/ \
&& ./b2 --help \
&& ./b2 link=shared threading=multi variant=release address-model=64 \
&& ./b2 install \
&& cd /home \
&& rm -rvf boost_1_69_0 boost_1_69_0.tar.gz
RUN cd /home \
&& curl -L -O http://www-us.apache.org/dist//xerces/c/3/sources/xerces-c-3.2.2.tar.gz \
&& tar -xvzf xerces-c-3.2.2.tar.gz > /dev/null \
&& rm xerces-c-3.2.2.tar.gz \
&& cd xerces-c-3.2.2/ \
&& ./configure --prefix=/usr \
--enable-static --enable-shared --enable-netaccessor-socket \
--enable-transcoder-gnuiconv --enable-transcoder-iconv \
--enable-msgloader-inmemory --enable-xmlch-uint16_t --enable-xmlch-char16_t \
&& make clean && make && make install \
&& cd /home \
&& rm -rf xerces-c-3.2.2/
RUN cd /home \
&& git clone --depth=1 https://github.com/protocolbuffers/protobuf.git \
&& cd protobuf \
&& ./autogen.sh \
&& ./configure --prefix=/usr/ \
&& make clean && make && make install \
&& cd /home \
&& rm -rf protobuf
RUN cd /home && export PATH=$PATH:/opt/cmake/bin \
&& git clone --depth=1 --recurse-submodules https://github.com/cucumber/cucumber-cpp.git \
&& cd cucumber-cpp \
&& gem install bundler \
&& bundle install \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on -DCMAKE_INSTALL_PREFIX=/usr/local .. \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rf cucumber-cpp
ENV GSOAP_MAJ_VER=2.8
ENV GSOAP_MIN_VER=74
ARG BRANCH=master
RUN cd /home \
# && curl -L -O -k https://downloads.sourceforge.net/project/gsoap2/gsoap-$GSOAP_MAJ_VER/gsoap_$GSOAP_MAJ_VER.$GSOAP_MIN_VER.zip \
# && unzip gsoap_$GSOAP_MAJ_VER.$GSOAP_MIN_VER.zip \
# && cd gsoap_$GSOAP_MAJ_VER \
&& curl -L -O -k https://freefr.dl.sourceforge.net/project/gsoap2/gsoap-2.8/gsoap_2.8.74.zip \
&& unzip gsoap_2.8.74.zip \
&& cd gsoap-2.8 \
&& ./configure --prefix=/usr/ \
&& make clean && make && make install \
&& cd /home \
&& rm -rf gsoap-2.8 gsoap_2.8.74.zip
RUN wget https://www.jacorb.org/releases/3.9/jacorb-3.9-binary.zip \
&& unzip jacorb-3.9-binary.zip \
&& mv -v jacorb-3.9 /opt/ \
&& rm -v jacorb-3.9-binary.zip
RUN wget https://www.jacorb.org/releases/2.3.1/jacorb-2.3.1-bin.zip \
&& unzip jacorb-2.3.1-bin.zip \
&& mv -v jacorb-2.3.1 /opt/ \
&& rm -v jacorb-2.3.1-bin.zip
RUN wget https://www-eu.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz \
&& tar -xvzf apache-maven-3.6.0-bin.tar.gz \
&& mv apache-maven-3.6.0/ /opt/apache-maven \
&& rm -v apache-maven-3.6.0-bin.tar.gz
RUN cd /home \
&& wget --no-cookies --no-check-certificate \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"\
"https://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/jdk-8u192-linux-x64.tar.gz" \
&& tar -xvzf jdk-8u192-linux-x64.tar.gz \
&& mv -v jdk1.8.0_192 /opt/ \
&& cd /home \
&& rm -vf jdk-8u192-linux-x64.tar.gz
ENV JAVA_HOME /opt/jdk1.8.0_192
ENV JRE_HOME /opt/jdk1.8.0_192/jre
ENV JACORB_HOME /opt/jacorb-2.3.1
ENV M2_HOME /opt/apache-maven/
ENV M2 $M2_HOME/bin
ENV MAVEN_OPTS "-Dstyle.info=bold,green -Dstyle.project=bold,magenta -Dstyle.warning=bold,yellow \
-Dstyle.mojo=bold,cyan -Xmx1048m -Xms256m -XX:MaxPermSize=312M"
ENV GSOAPHOME /usr
ENV PROTOBUF_HOME /usr
ENV SPLICE_TARGET x86_64.linux-release
ENV SPLICE_REAL_TARGET x86_64.linux-release
ENV SPLICE_HOST x86_64.linux-release
ENV PATH $PATH:/opt/apache-maven/bin/:/opt/cmake/bin:/opt/jdk1.8.0_192/bin:/opt/jdk1.8.0_192/jre/bin
RUN cmake --version \
&& make --version \
&& gcc --version \
&& java -version \
&& mvn --version
COPY stdsoap2.c /home
RUN cd /home \
&& git clone --depth=1 --recurse-submodules https://github.com/eProsima/Fast-RTPS.git \
&& cd Fast-RTPS \
&& cmake -E make_directory build \
&& cmake -E chdir build cmake .. -DTHIRDPARTY=ON -DCMAKE_INSTALL_PREFIX=/usr/eprosima \
&& cmake --build build --target all --clean-first \
&& cmake --build build --target install \
&& cd /home \
&& rm -rf Fast-RTPS
RUN cd /home \
&& git clone --depth=1 --recurse-submodules https://github.com/ADLINK-IST/opensplice.git \
&& cd opensplice \
# && ./configure x86_64.linux-release && make && make install
# WKRND make[4]: *** No rule to make target '/usr/include/stdsoap2.c', needed by 'stdsoap2.c'. Stop.
# && ln -s /opt/gsoap-$GSOAP_MAJ_VER/gsoap/stdsoap2.c /opt/gsoap-$GSOAP_MAJ_VER/usr/include/ \
&& cp -v /home/stdsoap2.c /usr/include/stdsoap2.c \
&& /bin/bash -c "source configure $SPLICE_TARGET && make clean && make && make install" \
&& mv -v install/HDE /opt/ \
&& cd /home \
&& rm -rf opensplice
# Setting environment variables
# ENV OSPL_HOME /opt/HDE/x86_64.linux
# ENV PATH $OSPL_HOME/bin:$PATH
# ENV LD_LIBRARY_PATH $OSPL_HOME/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
# ENV CPATH $OSPL_HOME/include:$OSPL_HOME/include/sys:${CPATH}
# ENV OSPL_URI file://$OSPL_HOME/etc/config/ospl.xml
COPY qt-installer-noninteractive.qs /home
# ARG QT_VERSION=5.12.0
# ENV QT_PATH=/opt/Qt
# ENV QT_DESKTOP $QT_PATH/${QT_VERSION}/gcc_64
# ENV QTDIR $QT_PATH/${QT_VERSION}/gcc_64
# ENV PATH $QT_DESKTOP/bin:$PATH
# RUN cd /home \
# && curl -L -O -k https://download.qt.io/official_releases/qt/5.12/5.12.0/qt-opensource-linux-x64-5.12.0.run \
# && chmod +x qt-opensource-linux-x64-5.12.0.run \
# && ./qt-opensource-linux-x64-5.12.0.run --verbose --script /home/qt-installer-noninteractive.qs
ENV OPENDDS_BUILD_OPTIONS "-std=c++11 --ipv6 --openssl --xerces3=/usr/ --java --rapidjson --glib --boost=/usr/"
ENV OPENDDS_BUILD_CONFIG_OPTIONS "--no-tests --no-inline --features=versioned_namespace=1 --macros=c++11=1 --no-debug --optimize"
ENV DDS_BUILD_CONFIG_OPTIONS "--security --safety-profile=base"
# --qt --wireshark=/usr/local/include/wireshark/
ARG GET_DDS_REPO="https://github.com/objectcomputing/OpenDDS.git"
ARG GET_DDS_VERSION="DDS-3.13"
RUN cd /home \
&& git clone --depth=1 --recurse-submodules ${GET_DDS_REPO} \
&& cd OpenDDS \
## && git fetch origin ${GET_DDS_VERSION} \
## && git checkout ${GET_DDS_VERSION} \
&& ./configure $OPENDDS_BUILD_OPTIONS $OPENDDS_BUILD_CONFIG_OPTIONS $DDS_BUILD_CONFIG_OPTIONS \
--mpcopts="-workers 2" --ace-github-latest \
--prefix=/usr/opendds \
&& ./tools/scripts/show_build_config.pl \
&& export LD_LIBRARY_PATH+=:${pwd}/build/target/ACE_TAO/ACE/lib:${ACE_ROOT}/lib:${pwd}/build/target/lib:${pwd}/lib \
&& make clean && make && make install \
&& cd /home \
&& rm -rvf OpenDDS
CMD ["/bin/bash"]