This suggests the pip install is running ahead and being attempted before the apt-get installs have finished and the when pip fails, the APT-GET is cancelled because the whole build has borked.
What should've happened instead?
The build should have completed successfully
Additional details
Host system configuration:
Version of cookiecutter CLI
Cookiecutter 1.7.3
OS name and version:
ProductName: macOS
ProductVersion: 11.6.4
BuildVersion: 20G417
Docker Compose version v2.3.3
Docker version 20.10.13, build a224086
Python on host: Python 3.10.0 (v3.10.0:b494f5935c
Python on Docker: Python 3.9.12 (main, Mar 29 2022, 14:20:48) [GCC 10.2.1 20210110] on linux
Python version, run python3 -V:
Docker version (if using Docker), run docker --version:
docker-compose version (if using Docker), run docker-compose --version:
...
Options selected and/or replay file:
On Linux and MacOS: cat ${HOME}/.cookiecutter_replay/cookiecutter-django.json
(Please, take care to remove sensitive information)
instead of git-all, how about just git? I also install git in my Dockerfile and it works
ARG PYTHON_VERSION=3.9-slim-bullseye
# define an alias for the specfic python version used in this file.
FROM python:${PYTHON_VERSION} as python
# Python build stage
FROM python as python-build-stage
RUN echo"deb http://deb.debian.org/debian bullseye main"> /etc/apt/sources.list
ARG BUILD_ENVIRONMENT=local
# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
# dependencies for building Python packages
build-essential curl vim wget git ####### HERE #######
dantagg commentedMar 31, 2022
What happened?
I updated local django Dockerfile
python-build-stageto includeand updated
python-run-stageto includeI did this because one of my pip requirements needs git to install, for example
It isn't this, but the one I'm installing is in a private repository.
When I run
docker compose -f local.yml buildit fails with the following error
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?Looking at the build log, there is an error
and then further down there is
This suggests the pip install is running ahead and being attempted before the apt-get installs have finished and the when pip fails, the APT-GET is cancelled because the whole build has borked.
What should've happened instead?
The build should have completed successfully
Additional details
Host system configuration:
Cookiecutter 1.7.3
ProductName: macOS
ProductVersion: 11.6.4
BuildVersion: 20G417
Docker Compose version v2.3.3
Docker version 20.10.13, build a224086
Python on host: Python 3.10.0 (v3.10.0:b494f5935c
Python on Docker: Python 3.9.12 (main, Mar 29 2022, 14:20:48) [GCC 10.2.1 20210110] on linux
python3 -V:docker --version:docker-compose --version:Options selected and/or replay file:
On Linux and MacOS:
cat ${HOME}/.cookiecutter_replay/cookiecutter-django.json(Please, take care to remove sensitive information)
{ "cookiecutter": { "project_name": "Django Fabman", "project_slug": "django_fabman", "description": "Service to support the various extensions of Fabman for KWMC Factory", "author_name": "Daniel Tagg", "domain_name": "kwmc.factory", "email": "***@***.com", "version": "0.1.0", "open_source_license": "Not open source", "timezone": "Europe/London", "windows": "n", "use_pycharm": "y", "use_docker": "y", "postgresql_version": "14.1", "cloud_provider": "None", "mail_service": "Other SMTP", "use_async": "n", "use_drf": "y", "frontend_pipeline": "None", "use_celery": "n", "use_mailhog": "n", "use_sentry": "n", "use_whitenoise": "y", "use_heroku": "n", "ci_tool": "Gitlab", "keep_local_envs_in_vcs": "n", "debug": "n", "_template": "gh:cookiecutter/cookiecutter-django" }The text was updated successfully, but these errors were encountered: