0

My simple code is:

import dash
from dash import Dash,html
app=dash.Dash(__name__)
app.layout =html.Div('Hello from docker')
if __name__ == '__main__':
    app.run_server(host='127.0.0.1',port=8085,debug=False,)

My Dockerfile configuration is:

FROM python:3.11
WORKDIR /app
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt --default-timeout=100 future
COPY  . .
EXPOSE 8085
CMD ["python" ,"-m","Dashboard_App.z"]

When I run my code in pycharm or Command prompt it works proparely but when I run docker app image I get this error:

it shows this error

In general I can't run any dash app in my browser it whould run in docker but get error open it in browser

  • `app.run_server(host='0.0.0.0', port=8085, debug=False)` – roganjosh Aug 08 '23 at 13:31
  • That's fundamentally the same as, for example, [Deploying a minimal flask app in docker - server connection issues](https://stackoverflow.com/questions/30323224/deploying-a-minimal-flask-app-in-docker-server-connection-issues). Does that address your problem? If not, can you [edit] the question to include the error directly in the question in plain text? – David Maze Aug 08 '23 at 14:05

0 Answers0