-
Notifications
You must be signed in to change notification settings - Fork 16
Move dependencies declared in Dockerfile to more "proper" location #744
Comments
You are referring to this? RUN pip install -U pip \
&& pip install 'cryptography~=3.4.8' \
&& pip install snowflake-connector-python --no-use-pep517 \
&& pip install -r requirements.txt -r dev-requirements.txt
RUN if [ "$SKIP_MSSQL_INSTALLATION" != "true" ] ; then pip install -U pip -r mssql-requirements.txt ; fi For For snowflake and mssql we could make them extras in setup.py. However in the Dockerfile I am thinking they my still want to be installed the way they currently are, or a modified version of this, to take advantage of caching. Making them extras and installing them at the |
those are the lines i was referring to. just to clarify, the main problem i see is maintainability and extensibility - when we build a i'll let @PSalant726 comment further, though, because he brought up the caching concern, and seemed to think that adding to |
What I think we should do is remove the @PSalant726 does this accomplish what you are thinking? |
Just wanted to link to why a few of these lines were in the Dockerfile to begin with: #56 (See Notes section), although it's definitely possible there are other ways to do this. |
Thanks for the context @pattisdr, I have a couple ideas for this but not sure if they will work. One more question for you on this, I think this means |
Well it was needed for snowflake-sqlachemy which we use to connect and run queries against snowflake databases, so I think it would be always needed. It might be worth revisiting if we can install snowflake-sqlalchemy without this now though, this was seven months ago. |
Is your feature request related to a specific problem?
Per this discussion on a fidesops-plus PR, we should not maintain dependencies and their versions within our Dockerfile (see Dockerfile#L48-L49).
Describe the solution you'd like
Add these dependencies to
requirements.txt
so that, as @PSalant726 says, it "will both be more idiomatic, and allow us to better take advantage of image layer caching."Describe alternatives you've considered, if any
Perhaps there is a reason that these dependencies weren't added to
requirements.txt
to begin with? If so, we should look to resolve, because declaring dependencies within theDockerfile
seems likely to cause problems in the long run, specifically when thinking of building extensions to the core app, e.g.fidesops-plus
.Additional context
This came up when i copied these lines into a
fidesops-plus
Dockerfile
, and @PSalant726 flagged that as a problematic form of dependency management.The text was updated successfully, but these errors were encountered: