-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
70 lines (54 loc) · 2.1 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
#FROM ubuntu:16.04
FROM gcc:7
MAINTAINER Antoine Waugh
# Developer dependencies
RUN apt-get update && apt-get -y install \
apt-utils \
g++ \
wget \
make \
cmake \
git \
libboost-all-dev
#RUN \
# apt-get update && \
# apt-get install -y software-properties-common && \
# add-apt-repository ppa:ubuntu-toolchain-r/test && \
# apt-get update && \
# apt-get install -y gcc-7 g++-7 && \
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
WORKDIR /opt/jdk
RUN wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz \
&& tar -zxf jdk-8u151-linux-x64.tar.gz -C /opt/jdk \
&& update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_151/bin/java 100 \
&& update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_151/bin/javac 100
ENV JAVA_HOME /opt/jdk/jdk1.8.0_151
# Install SBE Lib & Headers
WORKDIR /
RUN git clone https://github.com/real-logic/agrona \
&& cd agrona \
&& ./gradlew \
&& cd .. \
&& git clone https://github.com/real-logic/simple-binary-encoding.git sbe \
&& cd sbe \
&& ./gradlew \
&& ./cppbuild/cppbuild \
&& wget ftp://ftp.cmegroup.com/SBEFix/Production/Templates/templates_FixBinary.xml \
&& mkdir include \
&& java -Dsbe.keyword.append.token=_ -Dsbe.target.language=Cpp -Dsbe.target.namespace=sbe -Dsbe.output.dir=include -Dsbe.errorLog=yes -jar sbe-all/build/libs/sbe-all-1.7.6-SNAPSHOT.jar templates_FixBinary.xml \
&& mv include/sbe /usr/local/include \
&& mv sbe-tool/src/main/cpp/sbe /usr/local/include/sbe \
&& mv cppbuild/Release/lib/libsbe.a /usr/local/lib \
&& cd .. \
&& rm -rf /sbe
COPY . /src
WORKDIR /src
RUN mkdir build \
&& cd build \
&& cmake .. && make \
&& mv cme_sbe_latency /usr/local/bin
WORKDIR /usr/local/bin
RUN wget ftp://ftp.cmegroup.com/SBEFix/Production/Configuration/config.xml
#ENTRYPOINT ["/usr/local/bin/cme_sbe_latency"]
#CMD ["0.0.0.0", "224.0.32.1", "15310"]