I have a docker image that i use to build and show docs for my package. I want this image to rebuild every time someone make a push to the main brunch. In order to do that I created a CI/CD.
The CI/CD logs in to docker and then tries to build the image.
The login works well and the image is starting to build, but when installing the requirements The program fails and returns:
RuntimeError: can’t start new thread
The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 2
Note that I’m working with gitlab.
I tried to install any other package (not the requirements.txt
file) and still got the same error.
I also tried to remove the installation (just copied some files) and it worked find.
I tried to build the image locally and it also worked (including the installation).
The docker image:
FROM *custom image*
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
WORKDIR /app/docs
RUN make html
EXPOSE 8000
CMD ["/use/bin/python3", "-m", "http.server", "8000"]
.yml file:
echo $password | docker login -u $username -password-stdin quay.io
docker build -t mycoolimagename:latest
# taging the image
docker push mycoolimagename:latest