Docker / Flask – Client sent an HTTP request to an HTTPS server

Published

everyone. I try to use Docker. I follow this guide:

https://cloud.croc.ru/blog/byt-v-teme/flask-prilozheniya-v-docker/

My app.py:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask
app = Flask(__name__)
 
@app.route('/')
def hello_world():
    return 'Moe Flask приложение в контейнере Docker.'
 
if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0')

Dockerfile:

FROM ubuntu:latest
MAINTAINER Valentin Sidorenko '[email protected]'
RUN apt-get update -y
RUN apt-get install -y software-properties-common
RUN apt-add-repository -y universe
RUN apt-get install -y python3-pip python-dev build-essential
COPY . /app
WORKDIR /app 
RUN pip3 install -r requirements.txt
ENTRYPOINT ['python']
CMD ['app.py']

App is working by itself, but in Docker returns:

Client sent an HTTP request to an HTTPS server.

I use Win7 x64, and Docker Quickstart Terminal

Thank you.

Source: Docker Questions

Published
Categorised as docker, flask, python Tagged , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq