-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.benchmark
47 lines (35 loc) · 1.44 KB
/
Dockerfile.benchmark
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
FROM microsoft/dotnet:2.1-sdk
RUN echo "deb http://ftp.debian.org/debian stretch-backports main" | tee /etc/apt/sources.list.d/stretch-backports.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential
RUN apt-get -t stretch-backports install -y --no-install-recommends cmake
RUN mkdir -p /tmp \
&& cd /tmp \
&& git clone https://github.com/rtsisyk/msgpuck.git \
&& cd msgpuck \
&& cmake -DCMAKE_BUILD_TYPE=Release . \
&& make \
&& make install \
&& rm -rf /tmp/msgpuck
RUN mkdir -p /tmp \
&& cd /tmp \
&& git clone https://github.com/msgpack/msgpack-c.git \
&& cd msgpack-c \
&& cmake -DCMAKE_BUILD_TYPE=Release . \
&& make \
&& make install \
&& rm -rf /tmp/msgpack-c
WORKDIR /app
RUN mkdir -p src/msgpack.spec tests/msgpack.spec.tests benchmarks/msgpack.spec.linux
ADD msgpack.spec.sln /app
ADD src/msgpack.spec/msgpack.spec.csproj /app/src/msgpack.spec/
ADD tests/msgpack.spec.tests/msgpack.spec.tests.csproj /app/tests/msgpack.spec.tests/
ADD benchmarks/msgpack.spec.linux/msgpack.spec.linux.csproj /app/benchmarks/msgpack.spec.linux/
RUN IsDocker=defined dotnet restore
ADD . /app
RUN IsDocker=defined dotnet build --no-restore -c Release
RUN (cd /app/benchmarks/msgpack.spec.linux/c \
&& cmake -DCMAKE_BUILD_TYPE=Release . \
&& make \
&& make install)
CMD ["dotnet", "/app/benchmarks/msgpack.spec.linux/bin/Release/netcoreapp2.1/msgpack.spec.linux.dll"]