Skip to Content
Flask Framework Cookbook - Second Edition
book

Flask Framework Cookbook - Second Edition

by Shalabh Aggarwal
July 2019
Beginner to intermediate
302 pages
9h 38m
English
Packt Publishing
Content preview from Flask Framework Cookbook - Second Edition

How to do it...

We will start with the catalog application from Chapter 11, Deployment and Post-Deployment, in the Managing and monitoring application performance with New Relic recipe:

  1. The first step toward creating a container is to create an image for it. A Docker image can easily be created in a scripted manner by creating a file named Dockerfile. This file contains the steps that Docker needs to perform in order to build an image for our application's container. A basic Dockerfile for our application would be as follows:
FROM python:3WORKDIR /usr/src/appCOPY requirements.txt requirements.txtRUN pip3 install -r requirements.txtCOPY . .ENTRYPOINT [ "python" ]CMD [ "run.py" ]

Each line in the preceding file is a command that is executed ...

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

Writing a Web Application with Flask

Writing a Web Application with Flask

Doug Farrell
Mastering Flask

Mastering Flask

Jack Stouffer

Publisher Resources

ISBN: 9781789951295Supplemental Content