2019-08-26 13:00:17 +00:00
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
2019-10-02 15:02:24 +00:00
|
|
|
ADD . /nimplay/
|
|
|
|
WORKDIR /nimplay/
|
2019-09-26 13:45:05 +00:00
|
|
|
|
2019-08-26 13:00:17 +00:00
|
|
|
RUN apt-get update && \
|
2019-09-26 13:45:05 +00:00
|
|
|
apt-get install -y software-properties-common wget curl gcc g++ git cmake && \
|
2019-08-26 13:00:17 +00:00
|
|
|
wget https://nim-lang.org/download/nim-0.20.2-linux_x64.tar.xz && \
|
|
|
|
tar xf nim-0.20.2-linux_x64.tar.xz && \
|
|
|
|
cd nim-0.20.2 && \
|
|
|
|
./install.sh /usr/bin && \
|
|
|
|
cd .. && \
|
|
|
|
rm -rf nim-0.20.2 && \
|
|
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
|
|
|
|
apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" && \
|
|
|
|
apt-get install -y clang-8 lld-8 libc6-dev-i386 && \
|
2019-09-26 13:45:05 +00:00
|
|
|
rm -rf wabt && \
|
|
|
|
git clone --recursive https://github.com/WebAssembly/wabt wabt && \
|
|
|
|
mkdir -p wabt/build && \
|
|
|
|
cd wabt/build && \
|
|
|
|
cmake ".." && \
|
|
|
|
cmake --build "." && \
|
|
|
|
make install && \
|
|
|
|
cd ../../ && \
|
|
|
|
rm -rf wabt && \
|
2019-10-02 15:02:24 +00:00
|
|
|
nim c -d:release -p:/nimplay/vendor/nimcrypto -p:/nimplay/vendor/stint -p:/nimplay/vendor/nim-stew/ --out:/usr/bin/k256_sig tools/k256_sig.nim && \
|
|
|
|
nim c -d:release -p:/nimplay/vendor/nimcrypto -p:/nimplay/vendor/stint -p:/nimplay/vendor/nim-stew/ --out:/usr/bin/abi_gen tools/abi_gen.nim && \
|
|
|
|
cp tools/nimplayc /usr/bin/nimplayc && \
|
2019-08-26 13:00:17 +00:00
|
|
|
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 1000 && \
|
|
|
|
update-alternatives --install /usr/bin/wasm-ld wasm-ld /usr/bin/wasm-ld-8 1000 && \
|
2019-09-26 13:45:05 +00:00
|
|
|
apt-get remove -y cmake curl wget gcc software-properties-common && \
|
2019-08-26 13:00:17 +00:00
|
|
|
apt-get auto-remove -y && \
|
2019-09-26 13:45:05 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
2019-08-26 13:00:17 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/nim"]
|
|
|
|
|
|
|
|
|
|
|
|
# apt-get install libc6-dev-i386
|
|
|
|
# apt-get install lld-8
|
|
|
|
# update-alternatives --install /usr/bin/wasm-ld wasm-ld /usr/bin/wasm-ld-8 1000
|