I have the following problem:
I have a small web app written in Python. I run it in a docker container. Locally the web app works fine. When I deploy the container to Azure App Service I get the following error:
2021-09-07T15:11:32.980846527Z /bin/sh: 1: [gunicorn,: not found
Here is my Dockerfile
FROM python:3.8-slim-buster
EXPOSE 5000
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN python -m pip install -r requirements.txt
WORKDIR /app
COPY . /app
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "dash_app\dashboard:server"]
And here is the requirements.txt
flask
gunicorn
dash
pandas
I am new to docker and python. From my understanding pip install should install the latest version of everything from requirements.txt in the container itself. I don't understand why the gunicorn cannot be found.
Any help will be greatly appreciated.