Modified/Created codes to enable python flask app in python container
parent
ec9995d26c
commit
7f663d61fb
|
@ -37,10 +37,18 @@ services:
|
||||||
- ./nodejs/src/:/work
|
- ./nodejs/src/:/work
|
||||||
ports:
|
ports:
|
||||||
- 5502:5000
|
- 5502:5000
|
||||||
python:
|
python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh
|
||||||
container_name: python
|
container_name: python
|
||||||
image: cruxlight/python:1.0.0
|
image: cruxlight/python:1.0.0
|
||||||
build: ./python
|
build: ./python
|
||||||
|
working_dir: /work
|
||||||
|
entrypoint: /bin/sh
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./python/src/:/work
|
||||||
|
ports:
|
||||||
|
- 5503:5000
|
||||||
first-public-dockerhub-image:
|
first-public-dockerhub-image:
|
||||||
container_name: first-public-dockerhub-image
|
container_name: first-public-dockerhub-image
|
||||||
image: cruxlight/first-public-dockerhub-image:latest
|
image: cruxlight/first-public-dockerhub-image:latest
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
FROM python:3.7.3-alpine3.9
|
FROM python:3.7.3-alpine3.9
|
||||||
|
|
||||||
|
RUN pip install flask
|
|
@ -0,0 +1,6 @@
|
||||||
|
from flask import Flask
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def hello():
|
||||||
|
return "Hello World!"
|
Loading…
Reference in New Issue