You are previewing Pro Docker.
O'Reilly logo
Pro Docker

Book Description

In this fast-paced book on the Docker open standards platform for developing, packaging and running portable distributed applications, author Deepak Vohra discusses how to build, ship and run applications on any platform such as a PC, the cloud, data center or a virtual machine. He describes how to install Docker images and create Docker containers, and the advantages of Docker containers.

The remainder of the book is devoted to discussing using Docker with important software solutions. He begins by discussing using Docker with a traditional RDBMS using Oracle and MySQL. Next he moves on to NoSQL with chapter on MongoDB Cassandra, and Couchbase. Then he addresses the use of Docker in the Hadoop ecosystem with complete chapters on utilizing not only Hadoop, but Hive, HBase, Sqoop, Kafka, Solr and Spark.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. About the Technical Reviewer
  8. Chapter 1: Hello Docker
    1. Setting the Environment
    2. Installing Docker on Red Hat 7
    3. Uninstalling Docker
    4. Installing a Specific Docker Version
    5. Installing Docker on Ubuntu
    6. Starting the Docker Service
    7. Finding the Docker Service Status
    8. Running a Docker Hello World Application
    9. Downloading a Docker Image
    10. Running an Application in a Docker Container
    11. Listing Running Docker Containers
    12. Accessing the Application Output on Command Line
    13. Accessing the Application Output in a Browser
    14. Stopping a Docker Container
    15. Removing a Docker Container
    16. Removing a Docker Image
    17. Stopping the Docker Service
    18. Summary
  9. Chapter 2: Installing Linux
    1. Setting the Environment
    2. Downloading the Docker Image
    3. Listing Docker Images
    4. Running a Container in Detached Mode
    5. Running a Container in Foreground
    6. Listing Docker Containers
    7. Finding Oracle Linux Container Information
    8. Listing the Container Processes
    9. Starting an Interactive Shell
    10. Creating a Container
    11. Stopping a Container
    12. Removing a Container
    13. Summary
  10. Chapter 3: Using Oracle Database
    1. Setting the Environment
    2. Starting Oracle Database
    3. Listing Container Logs
    4. Starting SQL* Plus
    5. Creating a User
    6. Creating a Database Table
    7. Removing Oracle Database
    8. Summary
  11. Chapter 4: Using MySQL Database
    1. Setting the Environment
    2. Starting MySQL Server
    3. Starting MySQL CLI Shell
    4. Setting the Database to Use
    5. Creating a Database Table
    6. Adding Table Data
    7. Querying a Table
    8. Listing Databases and Tables
    9. Exiting TTY Terminal
    10. Stopping a Docker Container
    11. Starting Another MySQL Server Instance
    12. Listing Docker Container Logs
    13. Summary
  12. Chapter 5: Using MongoDB
    1. Setting the Environment
    2. Starting MongoDB
    3. Starting an Interactive Terminal
    4. Starting a Mongo Shell
    5. Creating a Database
    6. Creating a Collection
    7. Creating a Document
    8. Finding Documents
    9. Adding Another Document
    10. Querying a Single Document
    11. Dropping a Collection
    12. Adding a Batch of Documents
    13. Updating a Document
    14. Outputting Documents as JSON
    15. Making a Backup of the Data
    16. Removing Documents
    17. Stopping and Restarting the MongoDB Database
    18. Exiting the Mongo Shell
    19. Summary
  13. Chapter 6: Using Apache Cassandra
    1. Setting the Environment
    2. Starting Apache Cassandra
    3. Starting the TTY
    4. Connecting to CQL Shell
    5. Creating a Keyspace
    6. Altering A Keyspace
    7. Using A Keyspace
    8. Creating a Table
    9. Adding Table Data
    10. Querying a Table
    11. Deleting from a Table
    12. Truncating a Table
    13. Dropping A Table
    14. Dropping a Keyspace
    15. Exiting CQL Shell
    16. Stopping Apache Cassandra
    17. Starting Multiple Instances of Apache Cassandra
    18. Summary
  14. Chapter 7: Using Couchbase Server
    1. Setting the Environment
    2. Starting Couchbase
    3. Accessing Couchbase Web Console
    4. Configuring Couchbase Server Cluster
    5. Adding Documents
    6. Starting Interactive Terminal
    7. Running Couchbase CLI Tools
    8. Stopping Couchbase Server and Container
    9. Summary
  15. Chapter 8: Using Apache Hadoop
    1. Setting the Environment
    2. Starting Hadoop
    3. Starting the Interactive Shell
    4. Creating Input Files for a MapReduce Word Count Application
    5. Running a MapReduce Word Count Application
    6. Stopping the Hadoop Docker Container
    7. Using a CDH Docker Image
    8. Summary
  16. Chapter 9: Using Apache Hive
    1. Setting the Environment
    2. Starting Apache Hive
    3. Connecting to Beeline CLI Shell
    4. Connecting to HiveServer2
    5. Creating a Hive Table
    6. Loading Data into the Hive Table
    7. Querying Hive Table
    8. Stopping Apache Hive
    9. Summary
  17. Chapter 10: Using Apache HBase
    1. Setting the Environment
    2. Starting CDH
    3. Starting Interactive Shell
    4. Starting HBase Shell
    5. Creating a HBase Table
    6. Listing HBase Tables
    7. Getting A Single Table Row
    8. Getting A Single Row Column
    9. Scanning a Table
    10. Stopping CDH
    11. Summary
  18. Chapter 11: Using Apache Sqoop
    1. Setting the Environment
    2. Starting Docker Containers
    3. Starting Interactive Terminals
    4. Creating a MySQL Tables
    5. Adding MySQL JDBC Jar to Sqoop Classpath
    6. Setting the JAVA_HOME Environment Variable
    7. Configuring Apache Hadoop
    8. Importing MySQL Table Data into HDFS with Sqoop
    9. Listing Data Imported into HDFS
    10. Exporting from HDFS to MySQL with Sqoop
    11. Querying Exported Data
    12. Stopping and Removing Docker Containers
    13. Summary
  19. Chapter 12: Using Apache Kafka
    1. Setting the Environment
    2. Starting Docker Containers for Apache Kafka
    3. Finding IP Addresses
    4. Listing the Kafka Logs
    5. Creating a Kafka Topic
    6. Starting the Kafka Producer
    7. Starting the Kafka Consumer
    8. Producing and Consuming Messages
    9. Stopping and Removing the Docker Containers
    10. Summary
  20. Chapter 13: Using Apache Solr
    1. Setting the Environment
    2. Starting Docker Container for Apache Solr Server
    3. Starting the Interactive Shell
    4. Logging in to the Solr Admin Console
    5. Creating a Core Index
    6. Loading Sample Data
    7. Querying Apache Solr in Solr Admin Console
    8. Querying Apache Solr using REST API Client
    9. Deleting Data
    10. Listing Logs
    11. Stopping Apache Solr Server
    12. Summary
  21. Chapter 14: Using Apache Spark
    1. Setting the Environment
    2. Running the Docker Container for CDH
    3. Running Apache Spark Job in yarn-cluster Mode
    4. Running Apache Spark Job in yarn-client Mode
    5. Running the Apache Spark Shell
    6. Summary
  22. Appendix A: Using the Amazon EC2
    1. Creating an Amazon EC2 Instance
    2. Creating a Key Pair
    3. Starting an Amazon EC2 Instance
    4. Connecting to an Amazon EC2 Instance
    5. Finding the Public IP Address
    6. Finding the Public DNS
    7. Adding the default Security Group
    8. Stopping an Amazon EC2 Instance
    9. Changing the Instance Type
    10. Summary
  23. Index