simple-webapp-flask icon indicating copy to clipboard operation
simple-webapp-flask copied to clipboard

When running the image in docker throws an error

Open classyKSC opened this issue 3 years ago • 1 comments

C:\Windows\System32\my-webapp>docker run -p 8080:8080 my-webapp

  • Serving Flask app 'app.py' (lazy loading)
  • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Debug mode: off Usage: flask run [OPTIONS] Try 'flask run --help' for help.

Error: Could not import 'app'.

classyKSC avatar Jul 26 '21 05:07 classyKSC

@mmumshad getting the same error while running FLASK_APP=app.py flask run --host=0.0.0.0 command.

When tried running this command FLASK_APP=app.py FLASK_ENV=development DEBUG=True flask run got error as below

 * Environment: development
 * Debug mode: on
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'app', an ImportError was raised.

kindly help.

chaurasia-namrata avatar Dec 05 '21 21:12 chaurasia-namrata