/
Dockerfile-base
35 lines (31 loc) · 1.13 KB
/
Dockerfile-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.10-alpine
LABEL description.short="Cowbird base"
LABEL description.long="Cowbird middleware to manage interactions between various birds of the bird-house stack."
LABEL Maintainer="Ouranos, CRIM"
LABEL Vendor="Ouranos inc."
LABEL Version="2.3.0"
ENV COWBIRD_DIR=/opt/local/src/cowbird
ENV COWBIRD_CONFIG_DIR=${COWBIRD_DIR}/config
WORKDIR ${COWBIRD_DIR}
# install dependencies
COPY cowbird/__init__.py cowbird/__meta__.py ${COWBIRD_DIR}/cowbird/
COPY requirements* setup.py README.rst CHANGES.rst ${COWBIRD_DIR}/
RUN apk update \
&& apk add \
bash \
grep \
libxslt-dev \
&& apk add --virtual .build-deps \
gcc \
libffi-dev \
musl-dev \
git \
&& pip install --no-cache-dir --upgrade -r requirements-sys.txt \
&& pip install --no-cache-dir -e ${COWBIRD_DIR} \
&& apk --purge del .build-deps
# install app package source, avoid copying the rest
COPY ./config/cowbird.example.ini ${COWBIRD_CONFIG_DIR}/cowbird.ini
COPY ./cowbird ${COWBIRD_DIR}/cowbird/
# equivalent of `make install` without conda env and pre-installed packages
RUN pip install --no-dependencies -e ${COWBIRD_DIR}
CMD ["bash"]