From cafd0d5ecc8c3a1962f70c854b2d3f3990306ad2 Mon Sep 17 00:00:00 2001 From: Wenli Tsai Date: Mon, 14 Jan 2019 12:44:22 +0800 Subject: [PATCH] feat(Dockerfile): for build (#246) --- Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..3b4289710d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM ubuntu:18.04 +MAINTAINER a8568730 + +RUN apt update +RUN apt install -y \ +cmake \ +libboost-dev \ +libboost-filesystem-dev libboost-regex-dev libboost-system-dev libboost-locale-dev \ +libgoogle-glog-dev \ +libgtest-dev \ +libyaml-cpp-dev \ +libleveldb-dev \ +libmarisa-dev + +RUN apt install -y git + +# Manually install libopencc +RUN git clone https://github.com/BYVoid/OpenCC.git +WORKDIR OpenCC/ +RUN apt install -y doxygen +RUN make +RUN make install + +# Fix libgtest problem during compiling +WORKDIR /usr/src/gtest +RUN cmake CMakeLists.txt +RUN make +#copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder +RUN cp *.a /usr/lib + +# Build librime +WORKDIR / +RUN git clone https://github.com/rime/librime.git +WORKDIR librime/ +RUN make +RUN make install