FROM ubuntu:18.04 WORKDIR /app RUN apt-get update && \ apt-get install -y wget build-essential autotools-dev automake libmecab2 libmecab-dev autoconf && \ apt-get clean COPY . . RUN tar -zxvf mecab-0.996-ko-0.9.2.tar.gz RUN tar -zxvf mecab-ko-dic-2.1.1-20180720.tar.gz ## 사전업데이트 RUN cp -f /app/user-dic/*.csv /app/mecab-ko-dic-2.1.1-20180720/user-dic ## Mecab WORKDIR /app/mecab-0.996-ko-0.9.2 RUN ./configure RUN make RUN make check RUN make install RUN ldconfig RUN mecab --version ## DIC WORKDIR /app/mecab-ko-dic-2.1.1-20180720 RUN ./autogen.sh RUN ./configure RUN make RUN make install WORKDIR /app/mecab-ko-dic-2.1.1-20180720/tools RUN ./add-userdic.sh ## USER DIC - Build WORKDIR /app/mecab-ko-dic-2.1.1-20180720 ### 사용자정의단어 우선순위 UP~ RUN sed -i 's/[0-9][0-9][0-9][0-9]\,NNP/0\,NNP/g' user-nnp.csv RUN sed -i 's/[0-9][0-9][0-9][0-9]\,NNG/0\,NNG/g' user-nnp.csv RUN sed -i 's/[0-9][0-9][0-9][0-9]\,VCN/0\,VCN/g' user-vcn.csv RUN sed -i 's/[0-9][0-9][0-9][0-9]\,VCP/0\,VCP/g' user-vcp.csv RUN make clean RUN make install