add clang flags so that libcds will be compiled with llvm pass
[c11concurrency-benchmarks.git] / mabain / Dockerfile
1 # This is a multistage image build. Run the following command from the
2 # top directory of your repo clone.
3 #     docker build --rm -t chxdeng/mabain:latest .
4 FROM alpine:latest as builder
5
6 # Lets build Mabain in the alpine environment
7 WORKDIR /build
8 COPY . /build/
9 RUN apk update && apk add --no-cache g++ musl-dev make \
10     readline-dev ncurses-dev
11 RUN make distclean build install
12 # Lets run the unit-test build
13 RUN apk add --no-cache gtest gtest-dev openssl-dev gcovr && wget https://github.com/kinow/gtest-tap-listener/raw/master/src/tap.h -O /usr/include/gtest/tap.h
14 RUN make unit-test
15
16
17 # Now lets build the runtime
18 FROM alpine:latest
19 LABEL maintainer="Ted Bedwell tebedwel@cisco.com"
20 ENV MABAIN_INSTALL_DIR=/usr/local
21 RUN apk update && apk add --no-cache musl libstdc++ readline ncurses && mkdir /data && \
22     mkdir -p $MABAIN_INSTALL_DIR/include/mabain
23 COPY --from=builder $MABAIN_INSTALL_DIR/include/mabain/* \
24                     $MABAIN_INSTALL_DIR/include/mabain/
25
26 COPY --from=builder $MABAIN_INSTALL_DIR/lib/*mabain*.* \
27                     $MABAIN_INSTALL_DIR/lib/
28
29 COPY --from=builder $MABAIN_INSTALL_DIR/bin/mbc \
30                     $MABAIN_INSTALL_DIR/bin/
31
32 VOLUME /data