Learning Docker
eBook - ePub

Learning Docker

Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh

Share book
  1. 240 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Learning Docker

Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh

Book details
Book preview
Table of contents
Citations

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Learning Docker an online PDF/ePUB?
Yes, you can access Learning Docker by Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh in PDF and/or ePUB format, as well as other popular books in Informatik & Systemarchitektur. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781784397937
Edition
1

Learning Docker


Table of Contents

Learning Docker
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Docker
An introduction to Docker
Docker on Linux
Differentiating between containerization and virtualization
The convergence of containerization and virtualization
Containerization technologies
Installing the Docker engine
Installing from the Ubuntu package repository
Installing the latest Docker using docker.io script
Understanding the Docker setup
Client server communication
Downloading the first Docker image
Running the first Docker container
Running a Docker container on Amazon Web Services
Troubleshooting
Summary
2. Handling Docker Containers
Clarifying the Docker terms
Docker images and containers
A Docker layer
A Docker container
Docker Registry
Docker Repository
Working with Docker images
Docker Hub Registry
Searching Docker images
Working with an interactive container
Tracking changes inside containers
Controlling Docker containers
Housekeeping containers
Building images from containers
Launching a container as a daemon
Summary
3. Building Images
Docker's integrated image building system
A quick overview of the Dockerfile's syntax
The Dockerfile build instructions
The FROM instruction
The MAINTAINER instruction
The COPY instruction
The ADD instruction
The ENV instruction
The USER instruction
The WORKDIR instruction
The VOLUME instruction
The EXPOSE instruction
The RUN instruction
The CMD instruction
The ENTRYPOINT instruction
The ONBUILD instruction
The .dockerignore file
A brief overview of the Docker image management
Best practices for writing Dockerfiles
Summary
4. Publishing Images
Understanding the Docker Hub
Pushing images to the Docker Hub
Automating the building process for images
Private repositories on the Docker Hub
Organizations and teams on the Docker Hub
The REST APIs for the Docker Hub
Summary
5. Running Your Private Docker Infrastructure
The Docker registry and index
Docker registry use cases
Run your own index and registry
Step 1 – Deployment of the index components and the registry from GitHub
Step 2 – Configuration of nginx with the Docker registry
Step 3 – Set up SSL on the web server for secure communication
Push the image to the newly created Docker registry
Summary
6. Running Services in a Container
A brief overview of container networking
Envisaging the Container as a Service
Building an HTTP server image
Running the HTTP server Image as a Service
Connecting to the HTTP service
Exposing container services
Publishing container ports – the -p option
Network Address Translation for containers
Retrieving the container port
Binding a container to a specific IP address
Auto-generating the Docker host port
Port binding using EXPOSE and the -P option
Summary
7. Sharing Data with Containers
The data volume
Sharing host data
The practicality of host data sharing
Sharing data between containers
Data-only containers
Mounting data volume from other containers
The practicality of data sharing between containers
Avoiding common pitfalls
Directory leaks
The undesirable effect of data volume
Summary
8. Orchestrating Containers
Linking containers
Orchestration of containers
Orchestrate containers using docker-compose
Installing docker-compose
The docker-compose.yml file
The docker-compose command
Common usage
Summary
9. Testing with Docker
A brief overview of the test-driven development
Testing your code inside Docker
Running the test inside a container
Using a Docker container as a runtime environment
Integrating Docker testing into Jenkins
Preparing the Jenkins environment
Automating the Docker testing process
Summary
10. Debugging Containers
Process level isolation for Docker containers
Control groups
Debugging a containerized application
The Docker exec command
The Docker ps command
The Docker top command
The Docker stats command
The Docker events command
The Docker logs command
Installing and using nsenter
Summary
11. Securing Docker Containers
Are Docker containers secure enough?
The security facets – virtual machines versus Docker containers
The security features of containers
Resource isolation
Resource accounting and control
The root privilege – impacts and best practices
The trusted user control
Non-root containers
Loading the Docker images and the security implications
The emerging security approaches
Security-Enhanced Linux for container security
SELinux-inspired benefits
The best practices for container security
Digital signature verification
Secure deployment guidelines for Docker
The future
Summary
Index

Learning Docker

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2015
Production reference: 1240615
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-793-7
www.packtpub.com

Credits

Authors
Pethuru Raj
Jeeva S. Chelladhurai
Vinod Singh
Reviewe...

Table of contents