-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
53 lines (38 loc) · 1.77 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
FROM mambaorg/micromamba:git-0f27156 AS build-env
ENV PYTHONDONTWRITEBYTECODE=1
USER root
# make sure the install below is not cached by docker
ADD https://loripsum.net/api /opt/docker/etc/gibberish-to-bust-docker-image-cache
COPY environment.yml /tmp/environment.yml
RUN echo "**** install base env ****" && \
micromamba install --yes --quiet --name base -c conda-forge git conda python=3.11 && \
source /opt/conda/etc/profile.d/conda.sh && \
conda activate base && \
git clone https://github.com/regro/cf-scripts.git && \
micromamba install --yes --quiet --name base --file cf-scripts/environment.yml && \
micromamba install --yes --quiet --name base --file /tmp/environment.yml
RUN echo "**** cleanup ****" && \
micromamba clean --all --force-pkgs-dirs --yes && \
find "${MAMBA_ROOT_PREFIX}" -follow -type f \( -iname '*.a' -o -iname '*.pyc' -o -iname '*.js.map' \) -delete
RUN echo "**** finalize ****" && \
mkdir -p "${MAMBA_ROOT_PREFIX}/locks" && \
chmod 777 "${MAMBA_ROOT_PREFIX}/locks"
FROM frolvlad/alpine-glibc:alpine-3.16_glibc-2.34
COPY --from=build-env /opt/conda /opt/conda
COPY BASE_IMAGE_LICENSE /
LABEL maintainer="conda-forge (@conda-forge/core)"
ENV LANG en_US.UTF-8
ARG CONDA_DIR="/opt/conda"
ENV PATH="$CONDA_DIR/bin:$PATH"
ENV PYTHONDONTWRITEBYTECODE=1
COPY entrypoint /opt/docker/bin/entrypoint
RUN mkdir -p webservices_dispatch_action
COPY / webservices_dispatch_action/
RUN source /opt/conda/etc/profile.d/conda.sh && \
cd webservices_dispatch_action && \
conda activate base && \
pip install --no-build-isolation -e . && \
git clone https://github.com/regro/cf-scripts.git && \
cd cf-scripts && \
pip install --no-build-isolation -e .
ENTRYPOINT ["/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint"]