Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Docker for Developers
Docker for Developers

Docker for Developers: Develop and run your application with Docker containers using DevOps tools for continuous delivery

Arrow left icon
Profile Icon Richard Bullington-McGuire Profile Icon Andrew K. Dennis Profile Icon Michael Schwartz
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (11 Ratings)
Paperback Sep 2020 468 pages 1st Edition
eBook
Can$39.99 Can$44.99
Paperback
Can$55.99
Subscription
Free Trial
Arrow left icon
Profile Icon Richard Bullington-McGuire Profile Icon Andrew K. Dennis Profile Icon Michael Schwartz
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (11 Ratings)
Paperback Sep 2020 468 pages 1st Edition
eBook
Can$39.99 Can$44.99
Paperback
Can$55.99
Subscription
Free Trial
eBook
Can$39.99 Can$44.99
Paperback
Can$55.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Docker for Developers

Chapter 1: Introduction to Docker

Docker is a technology that allows entire applications and their environments to be encapsulated within individual containers. When multiple versions of these containers are run on a single machine, they are sandboxed from one another as if running on their own dedicated machines.

Docker is open source, which fits well with running Linux in containers, as well as numerous available open source components that help build complex systems. It is the logical progression of technologies used for hosting and backend development over the past decade or longer. This progression has moved from a physical kind of hosting to a logical one and has been driven by several requirements. These requirements include reliability, reachability, scalability, and security.

This book is divided into three sections. The first is an introduction to Docker, focusing on local development. The second describes the methodology for testing, deploying, and scaling applications. The third goes into detail about security when using a container-based design.

In this chapter, we will review the history of hosting and backend solutions with a focus on how Docker came to be a widely used technology.

The following topics will be covered in this chapter:

  • Origins of hosting services
  • Types of hosting services – co-location
  • Types of hosting services – self-hosting
  • The benefits of data centers
  • How virtualization works
  • The power requirements at data centers
  • How virtualization is a solution for data centers and the invention of the cloud
  • How containers are a bigger win for data centers and hosting

The drivers for Docker

The range of hosting services was originally limited to self-hosted servers, co-located server hosting, and shared hosting. In 1994 and 1995, Best Internet Communications rose from nothing to hosting 18,000+ websites on a pair of Pentium servers, which were the most powerful servers of the time. Best also offered dedicated server-hosting through co-location, dedicated broadband connectivity, and upscale premium services.  

Most of the websites hosted by Best were of the shared-hosting variety. All of these sites shared the same server, the same hard drives, the same filesystem, the same RAM, the same CPUs, the same network connections, and so on.  

It was not uncommon for any one of these websites to be slashdotted, or containing a link to the site from a very popular site to the hosted site. This would cause a large spike in traffic to the one out of the approximately 18,000 sites, and a performance hit to the others. As the quality of the sites grew and demanded more resources, their administrators would move to dedicated co-located hosting or self-hosting.

Co-located hosting

With co-located hosting, the customer rents a secure cage within a larger hosting facility (data center):

Figure 1.1 – A typical server rack, commonly seen in colocation

Figure 1.1 – A typical server rack, commonly seen in colocation

The customer can install and manage the machines of their choice. Some co-location facilities offer, for additional fees, remote hands service, where the customer can call the hosting company and one of their engineers does whatever the customer requires to the hosted servers. The cages are locked so that other customers can't gain access to other customers' equipment.

Self-hosting

With self-hosting, the customer buys a full-time dedicated broadband-style connection in a physical location of their choosing:

Figure 1.2 – Indian Railway 139 server room (self-hosting)

Figure 1.2 – Indian Railway 139 server room (self-hosting)

The customer ends up building their own kind of data center and installs and manages servers and other equipment on-premises.

Data centers

The benefits of a professional data center are numerous, and ultimately, the trend became that just a few companies, relative to all the companies with an internet presence, provided data centers, and the remaining companies paid rent for dedicated, shared, or premium hosting. A professional data center provides rich internet connectivity (more than one provider, faster connections), clean power, battery-backed-up power for 24/7/365 uptime, back-up generator-backed-up power for longer brownouts or blackouts, fire-suppression systems, a controlled climate suitable for keeping equipment at the proper operating temperatures, multiple physical locations, a professionally managed Network Operations Center (NOC) and technical support, and security in the form of guards, cameras, and fingerprint, handprint, and/or retina scanners:

Figure 1.3 – A server room at CERN (Switzerland)

Figure 1.3 – A server room at CERN (Switzerland)

The companies that ended up building and running the majority of data centers are Google (Google Cloud Platform), Microsoft (Azure), Amazon (Amazon Web Services (AWS)), Yahoo! (once upon a time), and lesser players, which include boutique hosting companies, regional hosting companies, and companies that require security beyond what a hosting company can provide (for example, banks and financial institutions, governments, and so on).

Amazon had a unique need for data centers. They are one of the largest online retailers in the world, as well as the largest data center developer/owner. The number of servers, the uptime, the security, and the reach that they require drove them to build data centers throughout the country and then the world.

Google has a unique need for data centers as well. They are the largest search engine and advertising company in the world. In order to be reachable, Google needs servers in as many physical places as possible. In order to be fast, Google needs many servers—at least enough servers for distributed search index processing in each of its geo-locations.

Companies such as RackSpace and Level 3 were originally built as data center providers. Their specialties included co-location facilities, dedicated server hosting, remote hands, NOCs, nationwide-dedicated fiber-optic backbones, clean and blackout resistant power, and very rich connectivity to various other networks, including AT&T, Verizon, and Comcast. They found themselves with the infrastructure to follow the trend toward virtualization and began to offer these cloud services.

The highest cost of providing data center services, and this passed on to the customer, was initially bandwidth. The providers paid for bandwidth by the megabit, plus a monthly cost of maintaining the physical connections that carried this bandwidth. As the providers built their own private infrastructure to carry data between their own data centers around the world, the cost became a flat rate, or a fixed cost, for a significant amount of the total bandwidth used. This allowed the price of bandwidth to decline to the point where it became a minimal consideration for hosting.

These companies ended up building a comprehensive infrastructure for dedicated hosting. It turns out that this infrastructure is ideally suited for virtualized product offerings, too.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand how to make a deployment workflow run smoothly with Docker containers
  • Learn Docker and DevOps concepts such as continuous integration and continuous deployment (CI/CD)
  • Gain insights into using various Docker tools and libraries

Description

Docker is the de facto standard for containerizing apps, and with an increasing number of software projects migrating to containers, it is crucial for engineers and DevOps teams to understand how to build, deploy, and secure Docker environments effectively. Docker for Developers will help you understand Docker containers from scratch while taking you through best practices and showing you how to address security concerns. Starting with an introduction to Docker, you’ll learn how to use containers and VirtualBox for development. You’ll explore how containers work and develop projects within them after you’ve explored different ways to deploy and run containers. The book will also show you how to use Docker containers in production in both single-host set-ups and in clusters and deploy them using Jenkins, Kubernetes, and Spinnaker. As you advance, you’ll get to grips with monitoring, securing, and scaling Docker using tools such as Prometheus and Grafana. Later, you’ll be able to deploy Docker containers to a variety of environments, including the cloud-native Amazon Elastic Kubernetes Service (Amazon EKS), before finally delving into Docker security concepts and best practices. By the end of the Docker book, you’ll be able to not only work in a container-driven environment confidently but also use Docker for both new and existing projects.

Who is this book for?

If you’re a software engineer new to containerization or a DevOps engineer responsible for deploying Docker containers in the cloud and building DevOps pipelines for container-based projects, you’ll find this book useful. This Docker containers book is also a handy reference guide for anyone working with a Docker-based DevOps ecosystem or interested in understanding the security implications and best practices for working in container-driven environments.

What you will learn

  • Get up to speed with creating containers and understand how they work
  • Package and deploy your containers to a variety of platforms
  • Work with containers in the cloud and on the Kubernetes platform
  • Deploy and then monitor the health and logs of running containers
  • Explore best practices for working with containers from a security perspective
  • Become familiar with scanning containers and using third-party security tools and libraries

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 14, 2020
Length: 468 pages
Edition : 1st
Language : English
ISBN-13 : 9781789536058
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Sep 14, 2020
Length: 468 pages
Edition : 1st
Language : English
ISBN-13 : 9781789536058
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 167.97
Mastering Docker, Fourth Edition
Can$55.99
Docker for Developers
Can$55.99
The Docker Workshop
Can$55.99
Total Can$ 167.97 Stars icon

Table of Contents

20 Chapters
Section 1: An Introduction to Docker – Containers and Local Development Chevron down icon Chevron up icon
Chapter 1: Introduction to Docker Chevron down icon Chevron up icon
Chapter 2: Using VirtualBox and Docker Containers for Development Chevron down icon Chevron up icon
Chapter 3: Sharing Containers Using Docker Hub Chevron down icon Chevron up icon
Chapter 4: Composing Systems Using Containers Chevron down icon Chevron up icon
Section 2: Running Docker in Production Chevron down icon Chevron up icon
Chapter 5: Alternatives for Deploying and Running Containers in Production Chevron down icon Chevron up icon
Chapter 6: Deploying Applications with Docker Compose Chevron down icon Chevron up icon
Chapter 7: Continuous Deployment with Jenkins Chevron down icon Chevron up icon
Chapter 8: Deploying Docker Apps to Kubernetes Chevron down icon Chevron up icon
Chapter 9: Cloud-Native Continuous Deployment Using Spinnaker Chevron down icon Chevron up icon
Chapter 10: Monitoring Docker Using Prometheus, Grafana, and Jaeger Chevron down icon Chevron up icon
Chapter 11: Scaling and Load Testing Docker Applications Chevron down icon Chevron up icon
Section 3: Docker Security – Securing Your Containers Chevron down icon Chevron up icon
Chapter 12: Introduction to Container Security Chevron down icon Chevron up icon
Chapter 13: Docker Security Fundamentals and Best Practices Chevron down icon Chevron up icon
Chapter 14: Advanced Docker Security – Secrets, Secret Commands, Tagging, and Labels Chevron down icon Chevron up icon
Chapter 15: Scanning, Monitoring, and Using Third-Party Tools Chevron down icon Chevron up icon
Chapter 16: Conclusion – End of the Road, but not the Journey Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(11 Ratings)
5 star 63.6%
4 star 18.2%
3 star 0%
2 star 9.1%
1 star 9.1%
Filter icon Filter
Top Reviews

Filter reviews by




brando Dec 10, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I read this book over the course of a week and deployed docker containers into our repositories over a two week period following that. Then, the week after that, I gave a lunch n learn to the company, using what I had l learned from the book and experience from practice. Now we have containers for clean e2e testing, gitlab docker runners to run and scale to more runners without new VMs, they build containers for us, and it’s quickly become normal in our company. I’ll be reviewing the kuberneties sections over the new week to keep down the path. Thanks Richard. This book cuts to the chase and lives up to the title!
Amazon Verified review Amazon
jmortegac Feb 20, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very completed with practical examples, tools and use cases.
Amazon Verified review Amazon
Hattie Cobb Oct 04, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
When reading articles, tutorials and even books, that is very common that at the end of the reading you struggle about how to translate that to a real production situation. Believe me, this book is different. You get to the end with a sense that you are very likely to know what are the next steps to apply what you learned to your existent or new projects. And this means a lot. The book has some great balance from history, concepts, example and practice.Although there is a lot of cont to grasp and the book is not exhaustive about the subjects, it gives you the most important information and real-world scenarios. You will be confident about the path you need to go to improve your local environment, to prepare a CI/CD pipeline and ship your product to production with a high-quality workflow. The authors are careful enough to list different solutions and approaches because there is not a single tool that solves all the problems and this book give you enough to understand which stack could fit better to your software needs.If you want to know more about Docker on your local environment, how containers relate to production, container orchestration with Docker swarm or Kubernetes, container image publishing, etc, you need this book.I highly recommend it.
Amazon Verified review Amazon
robert pitts Apr 09, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recently had the opportunity to try out the "Docker for Developers" platform and I have to say, I'm thoroughly impressed. As someone who has been in the development industry for a few years, I'm always on the lookout for tools that can make my work more efficient and productive. Docker for Developers does just that.One of the standout features of Docker for Developers is the ease with which it allows you to create and manage containers. I was able to quickly spin up multiple containers, each with its own application stack, and then seamlessly switch between them. This made it much easier to test different configurations and ensure that my code was working as intended.Another great aspect of Docker for Developers is its ability to simplify the deployment process. With just a few simple commands, I was able to package my code into a container and deploy it to the cloud or on-premises environment. This saved me a ton of time and headaches compared to traditional deployment methods.One feature that I particularly appreciated was the ability to integrate with my existing development workflow. Docker for Developers works seamlessly with tools like Jenkins, Git, and Visual Studio Code, allowing me to incorporate it into my existing workflows without disrupting them.Overall, I highly recommend Docker for Developers to any developer looking to streamline their development process. With its intuitive interface, powerful container management, and seamless deployment capabilities, it's a must-have tool for any modern development team.
Amazon Verified review Amazon
Kunde aus Bremerhaven Feb 05, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I ch bin ganz begeistert.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.