Reputation: 403
The issue I am having is that after I try and run docker-compose up, after everything is downloaded(python dependencies) docker-compose will just hang on
Recreating sensorarray_web_1...
Attaching to sensorarray_web_1
My directory structure looks like like this:
.
├── 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 docker hello world example and it seems to be working fine.
Upvotes: 4
Views: 3393
Reputation: 403
So I figured I would try updating this evening to the latest docker-composer (1.2.0) and everything just kind of started working. I am still not sure what the problem was. However if someone lands on this page and is still running 1.1.0, I would suggest updating.
Upvotes: 4