[docker] Include pip license file (#12583)

* [docker] Include pip license file

This file has been missing in production builds

* Add CI test

* Update contrib/container/Dockerfile

Co-authored-by: Matthias Mair <code@mjmair.com>

* Fix typo

* path fix

* More pathing fixes

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Oliver
2026-08-09 07:27:15 +10:00
committed by GitHub
co-authored by Matthias Mair
parent bc150e09e8
commit eb37082149
3 changed files with 10 additions and 0 deletions
+4
View File
@@ -149,6 +149,10 @@ COPY --from=builder_stage /root/.local /root/.local
# Compile Django backend translations during image build
RUN bash -c "cd '${INVENTREE_HOME}' && invoke int.backend-compilemessages"
# Generate license information for installed python packages
RUN pip-licenses --format=json --with-license-file --no-license-path > "${INVENTREE_BACKEND_DIR}/InvenTree/InvenTree/licenses.txt" \
&& test -s "${INVENTREE_BACKEND_DIR}/InvenTree/InvenTree/licenses.txt"
# Launch the production server
CMD ["sh", "-c", "exec gunicorn -c ./gunicorn.conf.py InvenTree.wsgi -b ${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT} --chdir ${INVENTREE_BACKEND_DIR}/InvenTree"]