Issue 1:
Expected Behavior

App run with debug mode raise OSError

app = make_app()
celery = make_celery(app)
KafkaProducerExt(app)
if __name__ == "__main__":
app.run(debug=True)

Actual Behavior

App run with debug mode raise OSError, when i change debug to False, everything ok

* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
Traceback (most recent call last):
File "app/app.py", line 8, in <module>
app.run(debug=True)
File "/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/flask/app.py", line 943, in run
run_simple(host, port, self, **options)
File "/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/serving.py", line 988, in run_simple
run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
File "/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
sys.exit(reloader.restart_with_reloader())
File "/home/khanhdv/.virtualenvs/api_jd/lib/python3.5/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
exit_code = subprocess.call(args, env=new_environ, close_fds=False)
File "/usr/lib/python3.5/subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error

Environment

Python version: Python 3.5.2

Flask version:1.0.2

Werkzeug version:0.15.1

Issue 2:
The new 0.15.0 does not run in Docker for Windows. Have not tried Docker on other platforms.

Minimal example with Flask.

app.py

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello, world!'

if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')

Dockerfile

FROM python:3-onbuild
COPY . /usr/src/app
CMD ["python", "app.py"]

requirements.txt

# Werkzeug==0.14.1
Flask

Run docker build -t flask_test . and then docker run flask_test.

Error in container:

λ docker run flask_test
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
Traceback (most recent call last):
File "app.py", line 11, in <module>
app.run(debug=True, host='0.0.0.0')
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 943, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python3.6/site-packages/werkzeug/serving.py", line 988, in run_simple
run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
File "/usr/local/lib/python3.6/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
sys.exit(reloader.restart_with_reloader())
File "/usr/local/lib/python3.6/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
exit_code = subprocess.call(args, env=new_environ, close_fds=False)
File "/usr/local/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/usr/src/app/app.py

Uncomment the first line in requirements.txt and it runs properly after rebuild.