This repository has been archived by the owner on Aug 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (61 loc) · 2.17 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
64
65
66
67
68
69
70
FROM frolvlad/alpine-glibc:alpine-3.10
# much of image code ripped from
# https://github.com/Docker-Hub-frolvlad/docker-alpine-miniconda3
COPY BASE_IMAGE_LICENSE /
LABEL maintainer="conda-forge bot subteam (@conda-forge/bot)"
ENV LANG en_US.UTF-8
ARG CONDA_VERSION="4.7.12.1"
ARG CONDA_MD5="81c773ff87af5cfac79ab862942ab6b3"
ARG CONDA_DIR="/opt/conda"
ENV PATH="$CONDA_DIR/bin:$PATH"
ENV PYTHONDONTWRITEBYTECODE=1
# make sure the install below is not cached by docker
ADD http://worldclockapi.com/api/json/utc/now /opt/docker/etc/timestamp
# Install conda
RUN echo "**** install dev packages ****" && \
apk add --no-cache bash ca-certificates wget && \
\
echo "**** get Miniconda ****" && \
mkdir -p "$CONDA_DIR" && \
wget "http://repo.continuum.io/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh" -O miniconda.sh && \
echo "$CONDA_MD5 miniconda.sh" | md5sum -c && \
\
echo "**** install Miniconda ****" && \
bash miniconda.sh -f -b -p "$CONDA_DIR" && \
\
echo "**** install base env ****" && \
source /opt/conda/etc/profile.d/conda.sh && \
conda activate base && \
conda config --set show_channel_urls True && \
conda config --add channels conda-forge && \
conda config --show-sources && \
conda config --set always_yes yes && \
conda update --all && \
conda install --quiet \
git \
python=3.7 \
pip \
tini \
pygithub \
tenacity \
requests \
ruamel.yaml && \
\
echo "**** cleanup ****" && \
rm -rf /var/cache/apk/* && \
rm -f miniconda.sh && \
conda clean --all --force-pkgs-dirs --yes && \
find "$CONDA_DIR" -follow -type f \( -iname '*.a' -o -iname '*.pyc' -o -iname '*.js.map' \) -delete && \
\
echo "**** finalize ****" && \
mkdir -p "$CONDA_DIR/locks" && \
chmod 777 "$CONDA_DIR/locks"
COPY entrypoint /opt/docker/bin/entrypoint
RUN mkdir -p cf-autotick-bot-action
COPY / cf-autotick-bot-action/
RUN cd cf-autotick-bot-action && \
source /opt/conda/etc/profile.d/conda.sh && \
conda activate base && \
pip install -e .
ENTRYPOINT ["/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint"]
CMD ["/bin/bash"]