O'Reilly logo

Python Web Scraping Cookbook by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it

We proceed with the recipe as follows:

  1. First query Docker for running containers:
$ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES308a02f0e1a5 docker.elastic.co/elasticsearch/elasticsearch:6.1.1 "/usr/local/bin/do..." 7 seconds ago Up 6 seconds 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp romantic_kowalevski094a13838376 rabbitmq:3-management "docker-entrypoint..." 47 hours ago Up 47 hours 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp dreamy_easley
  1. Let's  stop the Elasticsearch container. To stop a container, we use docker stop <container-id>. Elasticsearch has a container ID of 308a02f0e1a5. The following stops the container 
$ docker stop 3030

To acknowledge ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required