From 1a9d301550ebbe7b00e74438ac48713156232018 Mon Sep 17 00:00:00 2001 From: Birtibu <130974179+Birtibu@users.noreply.github.com> Date: Tue, 18 Apr 2023 21:42:15 +0200 Subject: [PATCH] Document how to add 3rd party packages with Docker (#4279) * Update developing-locally-docker.rst Add 3rd party python packages * Update docs/developing-locally-docker.rst Co-authored-by: Bruno Alla * Update docs/developing-locally-docker.rst Co-authored-by: Bruno Alla --------- Co-authored-by: Bruno Alla --- docs/developing-locally-docker.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 935e86020..3dbe6e47d 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -144,6 +144,19 @@ This tells our computer that all future commands are specifically for the dev1 m $ eval "$(docker-machine env dev1)" +Add 3rd party python packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To install a new 3rd party python package, you cannot use ``pip install ``, that would only add the package to the container. The container is ephemeral, so that new library won't be persisted if you run another container. Instead, you should modify the Docker image: +You have to modify the relevant requirement file: base, local or production by adding: :: + + == + +To get this change picked up, you'll need to rebuild the image(s) and restart the running container: :: + + docker-compose -f local.yml build + docker-compose -f local.yml up + Debugging ~~~~~~~~~