-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-base
19 lines (18 loc) · 1.03 KB
/
Dockerfile-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.11.8-alpine3.19
WORKDIR /app
ADD pyproject.toml poetry.lock ./
ENV PATH="/root/.local/bin:${PATH}"
RUN \
apk update && apk upgrade && \
apk add --no-cache python3 ca-certificates libmemcached-dev && \
apk add --no-cache --virtual .build-deps curl cmake zlib-dev \
g++ make gcc musl-dev python3-dev libffi-dev openssl-dev && \
wget https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 && \
tar xvjf jemalloc-5.3.0.tar.bz2 && cd jemalloc-5.3.0 && ./configure && make && make install && \
cd ../ && rm -rf ./jemalloc* && \
curl -sSL https://install.python-poetry.org | python3 - && \
poetry install --only main && \
apk del .build-deps && \
cd ~/.cache/ && \
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete && \
rm -rf /var/cache/apk/* /var/lib/apk/* /etc/apk/cache/*