forked from conda/conda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (25 loc) · 954 Bytes
/
Dockerfile
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
36
37
38
39
FROM --platform=linux/amd64 debian:buster-slim AS buildbase
ARG MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
WORKDIR /tmp
RUN apt-get update && apt-get install -y wget
RUN wget --quiet $MINICONDA_URL -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean --all --yes
FROM --platform=linux/amd64 debian:buster-slim
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
COPY dev/linux/setup.sh /tmp
RUN bash /tmp/setup.sh
COPY --from=buildbase /opt/conda /opt/conda
ARG python_version=3.9
COPY ./tests/requirements.txt /tmp
# conda and test dependencies
RUN /opt/conda/bin/conda install --update-all -y -c defaults \
python=$python_version \
--file /tmp/requirements.txt && \
/opt/conda/bin/conda clean --all --yes
USER test_user
WORKDIR /opt/conda-src
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/bin/bash"]