-
Notifications
You must be signed in to change notification settings - Fork 286
/
Copy pathDockerfile
63 lines (56 loc) · 2.42 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM debian:12.6-slim@sha256:2ccc7e39b0a6f504d252f807da1fc4b5bcd838e83e4dec3e2f57b2a4a64e7214
LABEL maintainer="Anaconda, Inc"
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
# hadolint ignore=DL3008
RUN apt-get update -q && \
apt-get install -q -y --no-install-recommends \
bzip2 \
ca-certificates \
git \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
mercurial \
openssh-client \
procps \
subversion \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV PATH /opt/conda/bin:$PATH
CMD [ "/bin/bash" ]
# Leave these args here to better use the Docker build cache
# renovate: datasource=custom.miniconda_installer
ARG INSTALLER_URL_LINUX64="https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh"
ARG SHA256SUM_LINUX64="4b3b3b1b99215e85fd73fb2c2d7ebf318ac942a457072de62d885056556eb83e"
# renovate: datasource=custom.miniconda_installer
ARG INSTALLER_URL_S390X="https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-s390x.sh"
ARG SHA256SUM_S390X="bd2a0a8ea34c84c860868d5b8efde07afc51cdede76b64dd94e9c3fd2d65257e"
# renovate: datasource=custom.miniconda_installer
ARG INSTALLER_URL_AARCH64="https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-aarch64.sh"
ARG SHA256SUM_AARCH64="70afe954cc8ee91f605f9aa48985bfe01ecfc10751339e8245eac7262b01298d"
RUN set -x && \
UNAME_M="$(uname -m)" && \
if [ "${UNAME_M}" = "x86_64" ]; then \
INSTALLER_URL="${INSTALLER_URL_LINUX64}"; \
SHA256SUM="${SHA256SUM_LINUX64}"; \
elif [ "${UNAME_M}" = "s390x" ]; then \
INSTALLER_URL="${INSTALLER_URL_S390X}"; \
SHA256SUM="${SHA256SUM_S390X}"; \
elif [ "${UNAME_M}" = "aarch64" ]; then \
INSTALLER_URL="${INSTALLER_URL_AARCH64}"; \
SHA256SUM="${SHA256SUM_AARCH64}"; \
fi && \
wget "${INSTALLER_URL}" -O miniconda.sh -q && \
echo "${SHA256SUM} miniconda.sh" > shasum && \
sha256sum --check --status shasum && \
mkdir -p /opt && \
bash miniconda.sh -b -p /opt/conda && \
rm miniconda.sh shasum && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
/opt/conda/bin/conda clean -afy