Conversation
|
perhaps need to add the venv bin directory to the PATH as well |
Not sure I get you, bash should be globally available for any user 🤔 Using the container su beetle
which bash
> /usr/bin/bash |
|
Not for bash, but for |
|
I see what you mean now. Shouldn't be an issue as far as I can see, since we install all packages into the global python environment right now. |
Im not a 100% sure about this 😅 > docker exec -it -u beetle beets-flask-dev bash
beetle@beets-container-dev:/repo$ which python
/repo/backend/.venv/bin/python@semohr lets have a look at the venv convention together. |
We should only have one python binary which is located in .venv. We append that path to the global environment in the Dockerfile. We might ship a unused binary since we inherit from |
|
I think it's worth making PATH explicit in the tmux session or really anywhere else that needs it. The image environment variables work until they don't because some process got created in a different way or the environment was overwritten. |
|
The whole point of using a containerized image is to provide a reproducible environment. We need to be able to trust that the environment variables set in the Dockerfile are consistently available, regardless of the machine or runtime. This should be a core guarantee of containerized applications. If another application or image runner modifies environment variables like Having different I don’t think we need to preemptively include code/potential fixes that might be unnecessary. Let’s see if this fix works first. We can always revisit it if it doesn’t 🙃 As an fyi, for me the path seems to be correctly set inside the tmux session: beetle@beets-container:/music/inbox$ echo $PATH
/repo/backend/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
closes #282