Closed lmarinve closed 3 months ago
@lmarinve this is because when you have a gitsubmodule the .git folder actually becomes just a clear text to the original folder dir (under the parent directory). Addiitionally, the .git
directory is being used as part of docker build process for sdx-controller to overcome an issue with setuptools_scm (see https://github.com/atlanticwave-sdx/sdx-controller/blob/main/Dockerfile#L15-L19)
What is the purpose of this command? Can I comment on it?
pip install --no-cache-dir .[wsgi]
@lmarinve The purpose of those lines is in the comment right above it, and docker build
will break if you simply comment those lines out:
This requires a relatively newer docker version with BuildKit support. Using setuptools_scm will help us to get the version of sdx-controller programmatically (git commit hash included), and eventually add a /version
API (issue #219).
In any case, I don't think you should be building sdx-controller docker images separately. That is duplicate effort, and you are likely to end up with a bunch of local changes in order to make things "work". Instead, it would be much more helpful if you can use the images from Docker Hub (see https://hub.docker.com/r/awsdx/sdx-controller -- they are tagged with commit hashes or release tags, so you don't have to necessarily use the latest image always, although that would be useful), and let the problems surface, and report the problems in the appropriate repository when it is appropriate. Letting problems surface is the main point (or the whole point?) of continuous integration, as far as I understand.
Being able to build docker images off a git submodule is not a use case I am able to support.
Completed discussion
I am running docker build --no-cache -f ./Dockerfile -t sdx-controller .
and I getting this error
=> ERROR [stage-0 6/6] RUN --mount=source=.git,target=.git,type=bind pip install --no-cache-dir .[wsgi] 6.6s