I have a project that is set up to run with docker One one machine which is ubuntu I have been running it fine but recently I have tried to run it on my windows laptop and am getting a ModuleNotFoundError.
[2018-01-05 20:31:46 +0000] [5] [INFO] Starting gunicorn 19.7.1
explore_1 | [2018-01-05 20:31:46 +0000] [5] [INFO] Listening at: http://0.0.0.0:8080 (5)
explore_1 | [2018-01-05 20:31:46 +0000] [5] [INFO] Using worker: sync
explore_1 | [2018-01-05 20:31:46 +0000] [8] [INFO] Booting worker with pid: 8
explore_1 | [2018-01-05 20:31:46 +0000] [8] [ERROR] Exception in worker process
explore_1 | Traceback (most recent call last):
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
explore_1 | worker.init_process()
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
explore_1 | self.load_wsgi()
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
explore_1 | self.wsgi = self.app.wsgi()
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
explore_1 | self.callable = self.load()
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
explore_1 | return self.load_wsgiapp()
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
explore_1 | return util.import_app(self.app_uri)
explore_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
explore_1 | __import__(module)
explore_1 | ModuleNotFoundError: No module named 'wsgi'
explore_1 | [2018-01-05 20:31:46 +0000] [8] [INFO] Worker exiting (pid: 8)
explore_1 | [2018-01-05 20:31:47 +0000] [5] [INFO] Shutting down: Master
explore_1 | [2018-01-05 20:31:47 +0000] [5] [INFO] Reason: Worker failed to boot.
I checked to make sure my environment variables for paths are set up correctly. Are there any common gunicorn issues that may cause this or other things that stand out as obvious checks?
The dockerfile for this container is as follows:
FROM python:3
MAINTAINER [email protected]
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
ENV MODE dev
EXPOSE 8080
VOLUME /static
COPY src/static /static
RUN python3 setup.py install
#CMD python3 wsgi.py
CMD gunicorn -w 3 -b 0.0.0.0:8080 wsgi --reload
wsgi.py
? what is in /usr/src/app in the docker container? – Solstice