Closed jennirinker closed 5 years ago
We don't maintain or interact with the Anaconda3
image, if it's missing pip
then you could try making a Dockerfile FROM continuumio/anaconda3
and then include our pip install section
https://github.com/docker-library/python/blob/67e7d70195c46f16116a57307c364167cb1302f6/3.6/stretch/slim/Dockerfile#L103-L131
Our slim
and alpine
variants don't include git as it's 71MB, which is over half the size of the slim
image. However the standard python
image does include git
but is quite large at 922MB
Adding git
to the image is also a simple process
$ docker build -t python:3.6-slim-git - << EOF
> FROM python:3.6-slim
> RUN apt-get update \
> && apt-get install -y --no-install-recommends git \
> && apt-get purge -y --auto-remove \
> && rm -rf /var/lib/apt/lists/*
> EOF
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM python:3.6-slim
---> 5d4dd7f71a65
Step 2/2 : RUN apt-get update && apt-get install -y --no-install-recommends git && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
---> Using cache
---> cd01b3f89122
Successfully built cd01b3f89122
Successfully tagged python:3.6-slim-git
$ docker images | grep 3.6-slim
python 3.6-slim-git cd01b3f89122 About a minute ago 209MB
python 3.6-slim 5d4dd7f71a65 2 weeks ago 138MB
My CI/CD pipelines broke after the most recent GitLab server updates, and it seems to be related to the use of
CMD
versusENTRYPOINT
in docker files. My CI with Anaconda3 images broke (no pip) and my CI with Python3 images are also broken (no git). GitHub user leycec explains the issue better in this issue over here.Suggested fix: if it makes sense, switch the CMD command in the dockerfile to ENTRYPOINT so that it's mandatorily run on entry.
Here is an example failed pipeline: