Getting ready

First let's start up Elasticsearch in a container that is attached to the scraper-net network. We can kick that off with the following command:

$ docker run -e ELASTIC_PASSWORD=MagicWord --name=elastic --network scraper-net  -p 9200:9200 -p 9300:9300 docker.elastic.co/elasticsearch/elasticsearch:6.1.1

Elasticsearch is now up and running on our scarper-net network. It can be reached by apps in other containers using the name elastic. Now let's move onto creating the container for the API.

Get Python Web Scraping Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.