2022-05-03 04:48:04 +00:00
|
|
|
FROM python:alpine AS build
|
2022-07-28 06:01:09 +00:00
|
|
|
RUN apk add --no-cache gcc make musl-dev linux-headers git \
|
|
|
|
&& pip3 wheel --wheel-dir=/wheels \
|
2022-11-09 08:18:13 +00:00
|
|
|
aiofile \
|
2022-08-03 20:53:53 +00:00
|
|
|
flask \
|
2022-08-02 19:41:25 +00:00
|
|
|
git+https://github.com/Assarius/sanic-prometheus@Sanic_22 \
|
2022-08-03 20:53:53 +00:00
|
|
|
kubernetes \
|
2022-08-02 19:41:25 +00:00
|
|
|
kubernetes_asyncio \
|
2022-07-28 06:01:09 +00:00
|
|
|
motor \
|
2022-10-21 09:08:05 +00:00
|
|
|
prometheus-async \
|
2022-11-14 17:51:04 +00:00
|
|
|
prometheus-flask-exporter \
|
2022-07-28 06:01:09 +00:00
|
|
|
pyjwt \
|
2022-08-02 13:14:43 +00:00
|
|
|
pyyaml \
|
2022-08-02 19:41:25 +00:00
|
|
|
sanic \
|
2022-10-29 05:38:17 +00:00
|
|
|
sanic-ext \
|
2022-10-29 08:17:04 +00:00
|
|
|
sanic-wtf \
|
2022-09-09 11:46:53 +00:00
|
|
|
ecs-logging
|
2022-11-09 08:18:13 +00:00
|
|
|
|
|
|
|
# Work around buggy setup.py in caio
|
|
|
|
RUN git clone https://github.com/mosquito/caio/ \
|
|
|
|
&& cd caio \
|
|
|
|
&& python3 setup.py bdist_wheel \
|
|
|
|
&& rm /wheels/*caio*.whl \
|
|
|
|
&& cp dist/*.whl /wheels/
|
|
|
|
|
|
|
|
# Generate image without build dependencies
|
2022-05-03 04:48:04 +00:00
|
|
|
FROM python:alpine
|
|
|
|
COPY --from=build /wheels /wheels
|
2022-08-03 21:11:55 +00:00
|
|
|
RUN pip3 install --no-index /wheels/*.whl && rm -Rfv /wheels
|
2022-05-03 04:48:04 +00:00
|
|
|
LABEL name="k-space/microservice-base" \
|
|
|
|
version="rc" \
|
|
|
|
maintainer="Lauri Võsandi <lauri@k-space.ee>"
|
2022-10-29 19:41:57 +00:00
|
|
|
ENV PYTHONUNBUFFERED=1
|
2022-11-09 09:28:50 +00:00
|
|
|
ENV CAIO_IMPL=linux
|