-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile
25 lines (19 loc) · 855 Bytes
/
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
FROM cryolite/kanachan.prerequisites
ARG CMAKE_BUILD_TYPE=Release
COPY --chown=ubuntu . /opt/kanachan
USER ubuntu
WORKDIR /opt/kanachan
RUN pushd src/common && \
protoc -I. --cpp_out=. mahjongsoul.proto && \
popd && \
mkdir build && \
pushd build && \
cmake -DPYTHON_VERSION="$(python3 -V | sed -e 's@^Python[[:space:]]\{1,\}\([[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}@\1@')" \
-DPYTHON_INCLUDE_PATH=/usr/include/python"$(python3 -V | sed -e 's@^Python[[:space:]]\{1,\}\([[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}@\1@')" \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_C_COMPILER=/usr/local/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \
.. && \
VERBOSE=1 make -j paishan && \
popd
ENTRYPOINT ["build/src/paishan/paishan", "/data"]