install build-essential on Dockerfile

This commit is contained in:
Aarni Halinen
2021-04-14 17:20:15 +03:00
parent 19f8ff006c
commit d889df951c
+2 -9
View File
@@ -1,22 +1,15 @@
FROM python:3.9-alpine
FROM python:3.9-slim
ENV PYTHONUNBUFFERED 1
WORKDIR /app
COPY . ./
ENV POETRY_VERSION=1.1.4
# Rust and shit https://cryptography.io/en/latest/installation.html
RUN apk --no-cache --update --upgrade add gcc musl-dev python3-dev libffi-dev openssl-dev cargo \
# Pillow and maybe some unnneeded?
jpeg-dev zlib-dev build-base linux-headers pcre-dev bash \
# PSQL
&& apk add --no-cache postgresql-dev
RUN apt-get update && apt-get install --no-install-recommends -y build-essential
# System deps:
RUN pip install -U pip
RUN pip install "poetry==$POETRY_VERSION"
# Project initialization:
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev --no-interaction --no-ansi