forked from HDFGroup/hsds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·36 lines (30 loc) · 1.21 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
FROM continuumio/miniconda3@sha256:7838d0ce65783b0d944c19d193e2e6232196bada9e5f3762dc7a9f07dc271179 AS hsds-base
LABEL maintainer="Aleksandar Jelenak <[email protected]>"
RUN conda update conda -y && \
conda config --add channels conda-forge && \
conda config --set channel_priority strict && \
conda install conda-pack && \
conda create --name hsds --yes python=3.8
RUN conda install --name hsds --yes \
pip \
wheel \
curl
RUN conda-pack -n hsds -o /tmp/hsds-env.tar \
&& mkdir -p /opt/env/hsds \
&& cd /opt/env/hsds \
&& tar xf /tmp/hsds-env.tar \
&& rm /tmp/hsds-env.tar
RUN /opt/env/hsds/bin/conda-unpack
FROM debian:buster-slim AS hsds
LABEL maintainer="Aleksandar Jelenak <[email protected]>"
COPY --from=hsds-base /opt/env/hsds /opt/env/hsds
# Install HSDS
RUN mkdir /usr/local/src/hsds-src/ /usr/local/src/hsds/ /etc/hsds/
COPY . /usr/local/src/hsds-src
COPY admin/config/config.yml /etc/hsds/
COPY entrypoint.sh /
RUN /bin/bash -c "source /opt/env/hsds/bin/activate \
&& pip install /usr/local/src/hsds-src/ \
&& rm -rf /usr/local/src/hsds-src"
EXPOSE 5100-5999
ENTRYPOINT ["/bin/bash", "-c", "source /opt/env/hsds/bin/activate && /entrypoint.sh"]