Skip to content

Instantly share code, notes, and snippets.

@ToshY
Forked from rhamedy/Dockerfile
Created September 17, 2022 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ToshY/4d02f34d184e24d7b05ef600f593da2c to your computer and use it in GitHub Desktop.
Save ToshY/4d02f34d184e24d7b05ef600f593da2c to your computer and use it in GitHub Desktop.
Sample Flask App - Ping Service
from flask import Flask
app = Flask(__name__)
@app.route('/')
def pong_service():
return 'Hello, I am pong service!'
@app.route('/pong')
def do_pong():
return 'Pong'
if __name__ == "__main__":
app.run(host ='0.0.0.0', port = 5001, debug = True)
FROM python:3.8-slim-buster
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment