@@ -56,16 +56,37 @@ def test_apt_deps(dockerenv, deps, exp):
5656 ([], None , '' ),
5757 ([], ['conda-forge' ], '' ),
5858 (['dep1' , 'dep0' ], [],
59- """RUN conda config --set always_yes yes && \\
59+ """RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \\
60+ /bin/bash ~/miniconda.sh -b -p /opt/conda && \\
61+ rm ~/miniconda.sh && \\
62+ /opt/conda/bin/conda clean -tipsy && \\
63+ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \\
64+ echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \\
65+ echo "conda activate base" >> ~/.bashrc && \\
66+ conda config --set always_yes yes && \\
6067 conda update --all && \\
6168 conda install \\
6269 dep0 dep1 && \\
6370 conda clean --all && \\
6471 conda info
6572
73+ ENV TINI_VERSION v0.16.1
74+ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
75+ RUN chmod +x /usr/bin/tini
76+
77+ ENTRYPOINT [ "/usr/bin/tini", "--" ]
78+ CMD [ "/bin/bash" ]
79+
6680""" ),
6781 (['dep1' , 'dep0' ], ['conda-forge' , 'my-channel' ],
68- """RUN conda config --set always_yes yes && \\
82+ """RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \\
83+ /bin/bash ~/miniconda.sh -b -p /opt/conda && \\
84+ rm ~/miniconda.sh && \\
85+ /opt/conda/bin/conda clean -tipsy && \\
86+ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \\
87+ echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \\
88+ echo "conda activate base" >> ~/.bashrc && \\
89+ conda config --set always_yes yes && \\
6990 conda config --add channels my-channel && \\
7091 conda config --add channels conda-forge && \\
7192 conda update --all && \\
@@ -74,6 +95,13 @@ def test_apt_deps(dockerenv, deps, exp):
7495 conda clean --all && \\
7596 conda info
7697
98+ ENV TINI_VERSION v0.16.1
99+ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
100+ RUN chmod +x /usr/bin/tini
101+
102+ ENTRYPOINT [ "/usr/bin/tini", "--" ]
103+ CMD [ "/bin/bash" ]
104+
77105""" ),
78106])
79107def test_conda_deps (dockerenv , deps , channels , exp ):
@@ -122,17 +150,27 @@ def test_git_configure(dockerenv, name, email, exp):
122150EXP_BASE = """FROM zappa/project
123151
124152ENV HOME /root
153+ ENV LANG C.UTF-8
154+ ENV LC_ALL C.UTF-8
155+ ENV PATH /opt/conda/bin:$PATH
125156ENV REVER_VCS git
126157ENV VERSION x.y.z
127158
128159WORKDIR /root
129160
130161RUN apt-get -y update && \\
131162 apt-get install -y --fix-missing \\
132- dep0 dep1 && \\
163+ bzip2 ca-certificates curl dep0 dep1 git wget && \\
133164 apt-get clean -y
134165
135- RUN conda config --set always_yes yes && \\
166+ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \\
167+ /bin/bash ~/miniconda.sh -b -p /opt/conda && \\
168+ rm ~/miniconda.sh && \\
169+ /opt/conda/bin/conda clean -tipsy && \\
170+ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \\
171+ echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \\
172+ echo "conda activate base" >> ~/.bashrc && \\
173+ conda config --set always_yes yes && \\
136174 conda config --add channels my-channel && \\
137175 conda config --add channels conda-forge && \\
138176 conda update --all && \\
@@ -141,6 +179,13 @@ def test_git_configure(dockerenv, name, email, exp):
141179 conda clean --all && \\
142180 conda info
143181
182+ ENV TINI_VERSION v0.16.1
183+ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
184+ RUN chmod +x /usr/bin/tini
185+
186+ ENTRYPOINT [ "/usr/bin/tini", "--" ]
187+ CMD [ "/bin/bash" ]
188+
144189RUN pip install \\
145190 -r req1 -r req0 dep1 dep0
146191"""
0 commit comments