diff --git a/development/Dockerfile b/development/Dockerfile index b2f9008f..9e3f6c24 100644 --- a/development/Dockerfile +++ b/development/Dockerfile @@ -55,27 +55,24 @@ COPY . /source # Get container's installed Nautobot version as a forced constraint # NAUTOBOT_VER may be a branch name and not a published release therefor we need to get the installed version # so pip can use it to recognize local constraints. -# RUN pip show nautobot | grep "^Version: " | sed -e 's/Version: /nautobot==/' > constraints.txt +RUN pip show nautobot | grep "^Version: " | sed -e 's/Version: /nautobot==/' > constraints.txt # Use Poetry to grab dev dependencies from the lock file # Can be improved in Poetry 1.2 which allows `poetry install --only dev` # # We can't use the entire freeze as it takes forever to resolve with rigidly fixed non-direct dependencies, # especially those that are only direct to Nautobot but the container included versions slightly mismatch -# RUN poetry export -f requirements.txt --without-hashes --output poetry_freeze_base.txt -# RUN poetry export -f requirements.txt --with dev --without-hashes --output poetry_freeze_all.txt -# RUN sort poetry_freeze_base.txt poetry_freeze_all.txt | uniq -u > poetry_freeze_dev.txt +RUN poetry export -f requirements.txt --without-hashes --output poetry_freeze_base.txt +RUN poetry export -f requirements.txt --with dev --without-hashes --output poetry_freeze_all.txt +RUN sort poetry_freeze_base.txt poetry_freeze_all.txt | uniq -u > poetry_freeze_dev.txt # Install all local project as editable, constrained on Nautobot version, to get any additional # direct dependencies of the app -# RUN pip install -c constraints.txt -e . +RUN pip install -c constraints.txt -e . # Install any dev dependencies frozen from Poetry # Can be improved in Poetry 1.2 which allows `poetry install --only dev` -# RUN pip install -c constraints.txt -r poetry_freeze_dev.txt - -# This needs to be reverted once we release -RUN poetry install +RUN pip install -c constraints.txt -r poetry_freeze_dev.txt COPY development/nautobot_config.py ${NAUTOBOT_ROOT}/nautobot_config.py # !!! USE CAUTION WHEN MODIFYING LINES ABOVE