Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn Docker - Fundamentals of Docker 19.x - Second Edition

You're reading from  Learn Docker - Fundamentals of Docker 19.x - Second Edition

Product type Book
Published in Mar 2020
Publisher Packt
ISBN-13 9781838827472
Pages 592 pages
Edition 2nd Edition
Languages
Author (1):
Dr. Gabriel N. Schenker Dr. Gabriel N. Schenker
Profile icon Dr. Gabriel N. Schenker

Table of Contents (25) Chapters

Preface 1. Section 1: Motivation and Getting Started
2. What Are Containers and Why Should I Use Them? 3. Setting Up a Working Environment 4. Section 2: Containerization, from Beginner to Black Belt
5. Mastering Containers 6. Creating and Managing Container Images 7. Data Volumes and Configuration 8. Debugging Code Running in Containers 9. Using Docker to Supercharge Automation 10. Advanced Docker Usage Scenarios 11. Section 3: Orchestration Fundamentals and Docker Swarm
12. Distributed Application Architecture 13. Single-Host Networking 14. Docker Compose 15. Orchestrators 16. Introduction to Docker Swarm 17. Zero-Downtime Deployments and Secrets 18. Section 4: Docker, Kubernetes, and the Cloud
19. Introduction to Kubernetes 20. Deploying, Updating, and Securing an Application with Kubernetes 21. Monitoring and Troubleshooting an App Running in Production 22. Running a Containerized App in the Cloud 23. Assessments 24. Other Books You May Enjoy

Configuring containers

More often than not, we need to provide some configuration to the application running inside a container. The configuration is often used to allow one and the same container to run in very different environments, such as in development, test, staging, or production environments. 

In Linux, configuration values are often provided via environment variables. 

We have learned that an application running inside a container is completely shielded from its host environment. Thus, the environment variables that we see on the host are different from the ones that we see from within a container.

Let's prove that by first looking at what is defined on our host:

  1. Use this command:
$ export

On my macOS, I see something like this (shortened):

...
COLORFGBG '7;0'
COLORTERM truecolor
HOME /Users/gabriel
ITERM_PROFILE Default
ITERM_SESSION_ID w0t1p0...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}