diff --git a/.dockerignore b/.dockerignore index a1571bb83..b7007de54 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,8 @@ +Dockerfile +.dockerignore add_emoji_gsub.pyc build waveflag -.git/ \ No newline at end of file +.git/ +fonts/ diff --git a/Dockerfile b/Dockerfile index 13ab60bb7..ba054604e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,22 @@ -FROM python:3.7 -RUN apt update && apt install -y \ +FROM python:3.7-slim + +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ git \ zopfli \ - libcairo2-dev + libcairo2-dev \ + make \ + imagemagick \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* -# Install nototools RUN git clone https://github.com/googlefonts/nototools.git /nototools WORKDIR /nototools -RUN pip install -r requirements.txt -RUN pip install -e . - -# Create output dir -RUN mkdir /output +RUN pip install --no-cache -r requirements.txt && pip install --no-cache -e . ADD . /blobmoji WORKDIR /blobmoji -# Build blobmoji font +RUN mkdir /output + CMD make -j $(nproc) && cp NotoColorEmoji.ttf /output/