-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (29 loc) · 927 Bytes
/
Dockerfile
File metadata and controls
33 lines (29 loc) · 927 Bytes
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
FROM alpine:latest
ENV SRC /usr/local/src
WORKDIR ${SRC}
RUN apk add --no-cache build-base
RUN apk add --no-cache --virtual .build-deps \
bash \
curl \
git \
openssl \
sudo \
# install Mecab
&& git clone -b master --single-branch --depth 1 \
https://github.com/taku910/mecab.git \
${SRC}/mecab \
&& cd ${SRC}/mecab/mecab \
&& ./configure --enable-utf8-only --with-charset=utf8 \
&& make \
&& make install \
# install NEologd
&& git clone -b master --single-branch --depth 1 \
https://github.com/neologd/mecab-ipadic-neologd.git \
${SRC}/mecab-ipadic-neologd \
&& ${SRC}/mecab-ipadic-neologd/bin/install-mecab-ipadic-neologd -n -y \
# cleanup
&& rm -rf \
${SRC}/mecab \
${SRC}/mecab-ipadic-neologd \
&& apk del --purge .build-deps
CMD ["mecab", "-d", "/usr/local/lib/mecab/dic/mecab-ipadic-neologd"]