1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-15 04:32:21 +00:00
ton/docker/Dockerfile

37 lines
1.5 KiB
Text
Raw Normal View History

2021-07-27 10:20:35 +00:00
FROM ubuntu:20.04 as builder
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake clang-6.0 openssl libmicrohttpd-dev pkg-config libssl-dev zlib1g-dev gperf wget git ninja-build && \
2021-07-27 10:20:35 +00:00
rm -rf /var/lib/apt/lists/*
ENV CC clang-6.0
ENV CXX clang++-6.0
ENV CCACHE_DISABLE 1
2021-07-27 10:20:35 +00:00
WORKDIR /
RUN git clone --recursive https://github.com/ton-blockchain/ton
2021-07-27 10:20:35 +00:00
WORKDIR /ton
RUN mkdir build && \
cd build && \
Ignore usage of AVX512 and force AVX2 CPU instructions for better binaries' portability. (#580) * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * build storage-daemon and storage-daemon-cli binaries * force GSL 2.7.1 version * force GSL 2.7.1 version * handle missing BLAS library * handle missing BLAS library, force GSL 2.7.1 version, build storage-daemon and storage-daemon-cli binaries * Revert "handle missing BLAS library" This reverts commit 67ebd4abfaa667204c6c9717d9593c2274e38a99. * remove GSL * remove GSL only for 18.04 * remove GSL only for 18.04 * link blas library; leave gsl * merge upstream * make more portable binaries by excluding AVX512 CPU flag * make rocksdb to produce portable binaries * make rocksdb to produce portable binaries * make rocksdb to produce portable binaries * show OS CPU flags & force AVX2 * DPORTABLE=1 and -DTON_ARCH= * DPORTABLE=1 and -DTON_ARCH= and -DCMAKE_CXX_FLAGS="-mavx2" * DPORTABLE=1 and -DTON_ARCH= and -DCMAKE_CXX_FLAGS="-mavx2" * DPORTABLE=1 and -DCMAKE_CXX_FLAGS="-mavx2" only * Ignore usage of AVX512 and force AVX2 CPU instructions for better binaries portability. * Ignore usage of AVX512 and force AVX2 CPU instructions for better binaries' portability. * minor fix
2022-12-30 17:13:10 +00:00
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DCMAKE_CXX_FLAGS="-mavx2" .. && \
ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console generate-random-id dht-server lite-client
2021-07-27 10:20:35 +00:00
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y openssl wget libatomic1 && \
2021-07-27 10:20:35 +00:00
rm -rf /var/lib/apt/lists/*
2021-07-27 10:20:35 +00:00
RUN mkdir -p /var/ton-work/db && \
mkdir -p /var/ton-work/db/static
COPY --from=builder /ton/build/storage/storage-daemon/storage-daemon /usr/local/bin/
COPY --from=builder /ton/build/storage/storage-daemon/storage-daemon-cli /usr/local/bin/
2021-07-27 10:20:35 +00:00
COPY --from=builder /ton/build/lite-client/lite-client /usr/local/bin/
COPY --from=builder /ton/build/validator-engine/validator-engine /usr/local/bin/
COPY --from=builder /ton/build/validator-engine-console/validator-engine-console /usr/local/bin/
COPY --from=builder /ton/build/utils/generate-random-id /usr/local/bin/
WORKDIR /var/ton-work/db
COPY init.sh control.template ./
RUN chmod +x init.sh
ENTRYPOINT ["/var/ton-work/db/init.sh"]