Skip to Content
Hands-On Azure for Developers
book

Hands-On Azure for Developers

by Kamil Mrzygłód
November 2018
Intermediate to advanced
606 pages
15h 7m
English
Packt Publishing
Content preview from Hands-On Azure for Developers

Deploying a container

To use Docker images in SF, we will need a registry in Azure Container Registry. You can go back to Chapter 3, Deploying Web Applications as Containers, where I described in detail how to work with ACR and Docker.

Now we will try to deploy a simple Python application—to start, we will need Dockerfile, of course:

FROM python:2.7-slimWORKDIR /appADD . /appRUN pip install -r requirements.txtEXPOSE 80ENV NAME WorldCMD ["python", "app.py"]

Additionally, let's create a Python application, which will display simple text:

from flask import Flaskapp = Flask(__name__)@app.route("/")def hello():    return 'This is my first Service Fabric app!'if __name__ == "__main__":    app.run(host='0.0.0.0', port=80)

Now, run the docker build command: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing Azure: Putting Modern DevOps to Use

Implementing Azure: Putting Modern DevOps to Use

Florian Klaffenbach, Oliver Michalski, Markus Klein, Mohamed Wali

Publisher Resources

ISBN: 9781789340624Supplemental Content