Built Objects from Docker Build Don't Carry Over #437
Unanswered
aidanngill
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My aim is to use
pytest-celery
for my tests for a Django project. The issue that I am facing is that a folder I create in my worker's Dockerfile is no longer present when the worker runs.In my Dockerfile I use Poetry to install my dependencies to
/build
, away from/app
and/src
as those are overwritten later when the container is created.My goal is to then use this
/build
folder as a virtual environment for Celery to use. However, when I runpytest
it crashes, stating that Django is not installed. To try and solve this I explicitly stated that the/build/.venv/bin/celery
binary should be used, but this reveals that this path is completely absent from the image.Is there something I'm missing about the way
pytest-celery
creates images? If I build the worker image myself and runbash
on it the directory exists there.My worker creation script is also shown below.
...and the error I'm facing when running
pytest
.I also see here that it's using
python3.10
instead ofpython3.12
which is built into the Dockerimage?Any help is appreciated, thanks.
Beta Was this translation helpful? Give feedback.
All reactions