Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Pusnow committed Apr 23, 2023
1 parent c68d8ea commit ab1a661
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git/
.github/
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from debian:bullseye-slim as build
LABEL maintainer="wonsup@pusnow.com"
LABEL org.opencontainers.image.source https://github.com/Pusnow/mecab-ko-msvc

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y &&\
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
build-essential \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/

RUN pip3 --no-cache-dir install ninja meson

COPY . /src/
WORKDIR /src

RUN meson setup --prefix=/opt/mecab -Dbuildtype=debugoptimized builddir
RUN meson compile -C builddir
RUN meson install -C builddir

from debian:bullseye-slim
LABEL maintainer="wonsup@pusnow.com"
LABEL org.opencontainers.image.source https://github.com/Pusnow/mecab-ko-msvc

COPY --from=build /opt/mecab /opt/mecab
ENV PATH=/opt/mecab/bin:$PATH
CMD ["mecab"]

0 comments on commit ab1a661

Please sign in to comment.