Problem with docker

The problem is that after I try to run docker-compose, after everything is loaded (python dependencies), docker-compose will just freeze

Recreating sensorarray_web_1...
Attaching to sensorarray_web_1

My directory structure is as follows:

.
 ├── docker-compose.yml
 ├── Dockerfile
 ├── requirements.txt
 └── sensoryarray.py

Dockerfile:

FROM python:2.7
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code
CMD python sensorarray.py

Docker-compose.yml

web:
 build: .
 command: python sensorarray.py
ports:
 - "5000:5000"
volumes:
 - .:/code

sensoryarray.py:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return 'Hello World!'

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

I also ran the hello world dock example and it seems to be working fine.

+4
source share
1 answer

So, I decided that I would try to update this evening to the last docker composer (1.2.0), and everything that has just begun. I'm still not sure what the problem is. However, if someone lands on this page and is still working with 1.1.0, I would suggest updating.

+4
source

All Articles