Fix docker build in Mac: install libre2-dev

This commit is contained in:
Son 2021-11-14 19:36:54 +01:00
parent 790f0ed23c
commit 33e3227b81
1 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ COPY ./static/package*.json /code/static/
RUN cd /code/static && npm install
# Main image
FROM python:3.7-slim
FROM python:3.7
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
@ -23,14 +23,15 @@ COPY poetry.lock pyproject.toml ./
# Install and setup poetry
RUN pip install -U pip \
&& apt-get update \
&& apt install -y curl netcat gcc python3-dev gnupg git \
&& apt install -y curl netcat gcc python3-dev gnupg git libre2-dev \
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - \
# Remove curl and netcat from the image
&& apt-get purge -y curl netcat \
# Run poetry
&& poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi --no-root \
# Clear apt cache
# Clear apt cache \
&& apt-get purge -y libre2-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*