-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (53 loc) · 2.28 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
FROM ubuntu:latest
SHELL ["/bin/bash", "-c"]
RUN set -euxo pipefail; \
apt-get -y update; \
apt-get -y dist-upgrade; \
apt-get -y install \
bzip2 \
curl \
g++ \
git-core \
gpg \
libssl-dev \
make \
python3 \
python3-dev \
python3-pip \
xz-utils; \
apt-get clean && rm -rf /var/lib/apt/lists/*; \
python3 -m pip install -U pip; \
python3 -m pip install -U \
mahjong==1.1.11 \
setuptools \
wheel; \
useradd -ms /bin/bash ubuntu; \
mkdir /workspace; \
chown ubuntu:ubuntu /workspace
USER ubuntu
RUN set -euxo pipefail; \
pushd /workspace; \
git clone 'https://github.com/Cryolite/prerequisites'; \
popd; \
/workspace/prerequisites/gcc/install --debug --prefix /home/ubuntu/.local
ENV C_INCLUDE_PATH="/home/ubuntu/.local/include"
ENV CPLUS_INCLUDE_PATH="/home/ubuntu/.local/include"
ENV LIBRARY_PATH="/home/ubuntu/.local/lib64:/home/ubuntu/.local/lib"
ENV LD_LIBRARY_PATH="/home/ubuntu/.local/lib64:/home/ubuntu/.local/lib"
ENV PATH="/home/ubuntu/.local/bin${PATH:+:$PATH}"
RUN set -euxo pipefail; \
/workspace/prerequisites/cmake/install --debug --prefix /home/ubuntu/.local; \
echo 'import toolset : using ; using python : : /usr/bin/python3 ;' > /home/ubuntu/user-config.jam; \
/workspace/prerequisites/boost/download --debug --source-dir /workspace/boost; \
/workspace/prerequisites/boost/build --debug --source-dir /workspace/boost --prefix /home/ubuntu/.local -- \
-d+2 --with-headers --with-timer --with-python --build-type=complete --layout=tagged \
toolset=gcc variant=debug threading=multi link=shared runtime-link=shared \
cxxflags=-D_GLIBCXX_DEBUG cxxflags=-D_GLIBCXX_DEBUG_PEDANTIC \
cflags=-fsanitize=address cxxflags=-fsanitize=address linkflags=-fsanitize=address \
cflags=-fsanitize=undefined cxxflags=-fsanitize=undefined linkflags=-fsanitize=undefined; \
/workspace/prerequisites/boost/build --debug --source-dir /workspace/boost --prefix /home/ubuntu/.local -- \
-d+2 --with-headers --with-timer --with-python --build-type=complete --layout=tagged \
toolset=gcc variant=release threading=multi link=shared runtime-link=shared; \
rm -rf /workspace/boost
WORKDIR /workspace/tsumonya
ENTRYPOINT ["./build.sh"]