SlideShare a Scribd company logo
Using Docker Developing and Deploying Software
with Containers 1st Edition Adrian Mouat
download
https://textbookfull.com/product/using-docker-developing-and-
deploying-software-with-containers-1st-edition-adrian-mouat/
Download more ebook from https://textbookfull.com
We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!
Docker containers build and deploy with Kubernetes
Flannel Cockpit and Atomic First Printing Edition Henry
https://textbookfull.com/product/docker-containers-build-and-
deploy-with-kubernetes-flannel-cockpit-and-atomic-first-printing-
edition-henry/
The DevOps 2 1 Toolkit Docker Swarm Building testing
deploying and monitoring services inside Docker Swarm
clusters 1st Edition Viktor Farcic
https://textbookfull.com/product/the-devops-2-1-toolkit-docker-
swarm-building-testing-deploying-and-monitoring-services-inside-
docker-swarm-clusters-1st-edition-viktor-farcic/
The SQL Server Dba■s Guide to Docker Containers: Agile
Deployment Without Infrastructure Lock-in 1st Edition
Edwin M Sarmiento
https://textbookfull.com/product/the-sql-server-dba%c2%92s-guide-
to-docker-containers-agile-deployment-without-infrastructure-
lock-in-1st-edition-edwin-m-sarmiento/
Modern Full-Stack Development: Using TypeScript, React,
Node.js, Webpack, and Docker Zammetti
https://textbookfull.com/product/modern-full-stack-development-
using-typescript-react-node-js-webpack-and-docker-zammetti/
Developing Web Components with TypeScript: Native Web
Development Using Thin Libraries 1st Edition Jorg
Krause [Krause
https://textbookfull.com/product/developing-web-components-with-
typescript-native-web-development-using-thin-libraries-1st-
edition-jorg-krause-krause/
Deploy Containers on AWS With EC2, ECS, and EKS Shimon
Ifrah
https://textbookfull.com/product/deploy-containers-on-aws-with-
ec2-ecs-and-eks-shimon-ifrah/
Developing Web Components with TypeScript Native Web
Development Using Thin Libraries 1st Edition Jorg
Krause Krause Jörg
https://textbookfull.com/product/developing-web-components-with-
typescript-native-web-development-using-thin-libraries-1st-
edition-jorg-krause-krause-jorg/
Creating and Using Virtual Prototyping Software
Principles and Practices SEI Series in Software
Engineering 1st Edition Post
https://textbookfull.com/product/creating-and-using-virtual-
prototyping-software-principles-and-practices-sei-series-in-
software-engineering-1st-edition-post/
Developing bots with Microsoft Bots Framework: create
intelligent bots using MS Bot Framework and Azure
Cognitive Services 1st Edition Srikanth Machiraju
https://textbookfull.com/product/developing-bots-with-microsoft-
bots-framework-create-intelligent-bots-using-ms-bot-framework-
and-azure-cognitive-services-1st-edition-srikanth-machiraju/
Adrian Mouat
Using
Docker
DEVELOPING AND DEPLOYING SOFTWARE WITH CONTAINERS
www.it-ebooks.info
www.it-ebooks.info
Adrian Mouat
Boston
Using Docker
www.it-ebooks.info
978-1-491-91576-9
[LSI]
Using Docker
by Adrian Mouat
Copyright © 2016 Adrian Mouat. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editor: Brian Anderson
Production Editor: Melanie Yarbrough
Copyeditor: Christina Edwards
Proofreader: Amanda Kersey
Indexer: WordCo Indexing Services
Interior Designer: David Futato
Cover Designer: Randy Comer
Illustrator: Rebecca Demarest
December 2015: First Edition
Revision History for the First Edition
2015-12-07: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491915769 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Using Docker, the cover image, and
related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the author disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
www.it-ebooks.info
To those who try, whether they fail or succeed.
www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Part I. Background and Basics
1. The What and Why of Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Containers Versus VMs 4
Docker and Containers 6
Docker: A History 8
Plugins and Plumbing 10
64-Bit Linux 10
2. Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Installing Docker on Linux 13
Run SELinux in Permissive Mode 14
Running Without sudo 15
Installing Docker on Mac OS or Windows 15
A Quick Check 17
3. First Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Running Your First Image 19
The Basic Commands 20
Building Images from Dockerfiles 24
Working with Registries 27
Private Repositories 29
Using the Redis Official Image 30
Conclusion 33
v
www.it-ebooks.info
4. Docker Fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The Docker Architecture 35
Underlying Technologies 36
Surrounding Technologies 37
Docker Hosting 39
How Images Get Built 39
The Build Context 39
Image Layers 41
Caching 43
Base Images 44
Dockerfile Instructions 46
Connecting Containers to the World 49
Linking Containers 49
Managing Data with Volumes and Data Containers 51
Sharing Data 53
Data Containers 54
Common Docker Commands 55
The run Command 56
Managing Containers 59
Docker Info 62
Container Info 62
Dealing with Images 63
Using the Registry 66
Conclusion 67
Part II. The Software Lifecycle with Docker
5. Using Docker in Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Say “Hello World!” 71
Automating with Compose 81
The Compose Workflow 83
Conclusion 84
6. Creating a Simple Web App. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating a Basic Web Page 86
Taking Advantage of Existing Images 88
Add Some Caching 93
Microservices 96
Conclusion 97
vi | Table of Contents
www.it-ebooks.info
7. Image Distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Image and Repository Naming 99
The Docker Hub 100
Automated Builds 102
Private Distribution 104
Running Your Own Registry 104
Commerical Registries 111
Reducing Image Size 111
Image Provenance 113
Conclusion 114
8. Continuous Integration and Testing with Docker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Adding Unit Tests to Identidock 116
Creating a Jenkins Container 121
Triggering Builds 128
Pushing the Image 129
Responsible Tagging 129
Staging and Production 131
Image Sprawl 131
Using Docker to Provision Jenkins Slaves 132
Backing Up Jenkins 132
Hosted CI Solutions 133
Testing and Microservices 133
Testing in Production 135
Conclusion 135
9. Deploying Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Provisioning Resources with Docker Machine 138
Using a Proxy 141
Execution Options 147
Shell Scripts 148
Using a Process Manager (or systemd to Rule Them All) 150
Using a Configuration Management Tool 153
Host Configuration 157
Choosing an OS 157
Choosing a Storage Driver 157
Specialist Hosting Options 160
Triton 160
Google Container Engine 162
Amazon EC2 Container Service 162
Giant Swarm 165
Persistent Data and Production Containers 167
Table of Contents | vii
www.it-ebooks.info
Sharing Secrets 167
Saving Secrets in the Image 167
Passing Secrets in Environment Variables 168
Passing Secrets in Volumes 168
Using a Key-Value Store 169
Networking 170
Production Registry 170
Continuous Deployment/Delivery 171
Conclusion 171
10. Logging and Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Logging 174
The Default Docker Logging 174
Aggregating Logs 176
Logging with ELK 176
Docker Logging with syslog 187
Grabbing Logs from File 193
Monitoring and Alerting 194
Monitoring with Docker Tools 194
cAdvisor 196
Cluster Solutions 197
Commercial Monitoring and Logging Solutions 201
Conclusion 201
Part III. Tools and Techniques
11. Networking and Service Discovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Ambassadors 206
Service Discovery 210
etcd 210
SkyDNS 215
Consul 219
Registration 223
Other Solutions 225
Networking Options 226
Bridge 226
Host 227
Container 228
None 228
New Docker Networking 228
Network Types and Plugins 230
viii | Table of Contents
www.it-ebooks.info
Networking Solutions 230
Overlay 231
Weave 233
Flannel 237
Project Calico 242
Conclusion 246
12. Orchestration, Clustering, and Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Clustering and Orchestration Tools 250
Swarm 251
Fleet 257
Kubernetes 263
Mesos and Marathon 271
Container Management Platforms 282
Rancher 282
Clocker 283
Tutum 285
Conclusion 286
13. Security and Limiting Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Things to Worry About 290
Defense-in-Depth 292
Least Privilege 292
Securing Identidock 293
Segregate Containers by Host 295
Applying Updates 296
Avoid Unsupported Drivers 299
Image Provenance 300
Docker Digests 300
Docker Content Trust 301
Reproducible and Trustworthy Dockerfiles 305
Security Tips 307
Set a User 307
Limit Container Networking 309
Remove Setuid/Setgid Binaries 311
Limit Memory 312
Limit CPU 313
Limit Restarts 314
Limit Filesystems 314
Limit Capabilities 315
Apply Resource Limits (ulimits) 316
Run a Hardened Kernel 318
Table of Contents | ix
www.it-ebooks.info
Linux Security Modules 318
SELinux 319
AppArmor 322
Auditing 322
Incident Response 323
Future Features 324
Conclusion 324
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
x | Table of Contents
www.it-ebooks.info
Preface
Containers are a lightweight and portable store for an application and its dependencies.
Written down by itself, this sounds dry and boring. But the process improvements
made possible by containers are anything but; used correctly, containers can be game-
changing. So persuasive is the lure of the architectures and workflows made possible
by containers that it feels like every major IT company has gone in a year from never
having heard of Docker or containers to actively investigating and using them.
The rise of Docker has been astonishing. I don’t remember any technology that has
had such a fast and profound effect on the IT industry. This book is my attempt to
help you understand why containers are so important, what you stand to gain from
adopting containerization and, most importantly, how to go about it.
Who Should Read This Book
This book tries to take a holistic approach to Docker, explaining the reasons for using
Docker and showing how to use it and how to integrate it into a software-
development workflow. The book covers the entire software lifecycle, from develop‐
ment through to production and maintenance.
I have tried to avoid assuming too much of the reader beyond a basic knowledge of
Linux and software development in general. The intended readership is primarily
software developers, operations engineers, and system administrators (particularly
those keen to develop a DevOps approach), but technically informed managers and
enthusiasts should also be able to get something out of this book.
Why I Wrote This Book
I was in the fortunate position to learn about and use Docker while it was still in the
early stages of its meteoric rise. When the opportunity to write this book appeared, I
leapt at it with both hands. If my scribblings can help some of you to understand and
xi
www.it-ebooks.info
make the most of the containerization movement, I will have achieved more than I
have in years of developing software.
I truly hope that you enjoy reading this book and that it helps you on the path to
using Docker in your organization.
Navigating This Book
This book is organized roughly as follows:
• Part I starts by explaining what containers are and why you should be interested
in them, before going into a tutorial chapter showing the basics of Docker. It ends
with a large chapter explaining the fundamental concepts and technology in
Docker, including an overview of the various Docker commands.
• Part II explains how to use Docker in a software-development lifecycle. It starts
by showing how to set up a development environment, before building a simple
web application that is used as an ongoing example through the rest of Part II.
The chapter covers development, testing, and integration, as well as how to
deploy containers and how to effectively monitor and log a production system.
• Part III goes into advanced details and the tools and techniques needed to run
multihost clusters of Docker containers safely and reliably. If you are already
using Docker and need to understand how to scale up or solve networking and
security issues, this is for you.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program ele‐
ments such as variable or function names, databases, data types, environment
variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values deter‐
mined by context.
xii | Preface
www.it-ebooks.info
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for download at
https://github.com/using-docker/.
This book is here to help you get your job done. In general, if example code is offered
with this book, you may use it in your programs and documentation. You do not
need to contact us for permission unless you’re reproducing a significant portion of
the code. For example, writing a program that uses several chunks of code from this
book does not require permission. Selling or distributing a CD-ROM of examples
from O’Reilly books does require permission. Answering a question by citing this
book and quoting example code does not require permission. Incorporating a signifi‐
cant amount of example code from this book into your product’s documentation does
require permission.
We appreciate, but do not require, attribution. An attribution usually includes the
title, author, publisher, and ISBN. For example: “Using Docker by Adrian Mouat
(O’Reilly). Copyright 2016 Adrian Mouat, 978-1-491-91576-9.”
If you feel your use of code examples falls outside fair use or the permission given
above, feel free to contact us at permissions@oreilly.com.
Safari® Books Online
Safari Books Online is an on-demand digital library that deliv‐
ers expert content in both book and video form from the
world’s leading authors in technology and business.
Technology professionals, software developers, web designers, and business and crea‐
tive professionals use Safari Books Online as their primary resource for research,
problem solving, learning, and certification training.
Preface | xiii
www.it-ebooks.info
Safari Books Online offers a range of plans and pricing for enterprise, government,
education, and individuals.
Members have access to thousands of books, training videos, and prepublication
manuscripts in one fully searchable database from publishers like O’Reilly Media,
Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que,
Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kauf‐
mann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders,
McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more
information about Safari Books Online, please visit us online.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
We have a web page for this book, where we list errata, examples, and any additional
information. You can access this page at http://bit.ly/using-docker.
To comment or ask technical questions about this book, send email to bookques‐
tions@oreilly.com.
For more information about our books, courses, conferences, and news, see our web‐
site at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Acknowledgments
I am immensely grateful for all the help, advice, and criticism I received during the
writing of this book. If I missed your name in the following list, please accept my
apologies; your contribution was appreciated whether I acted on it or not.
For their generous feedback, I would like to thank Ally Hume, Tom Sugden, Lukasz
Guminski, Tilaye Alemu, Sebastien Goasguen, Maxim Belooussov, Michael Boelen,
xiv | Preface
www.it-ebooks.info
Ksenia Burlachenko, Carlos Sanchez, Daniel Bryant, Christoffer Holmstedt, Mike
Rathbun, Fabrizio Soppelsa, Yung-Jin Hu, Jouni Miikki, and Dale Bewley.
For technical conversations and input on specific technologies in the book, I would
like to thank Andrew Kennedy, Peter White, Alex Pollitt, Fintan Ryan, Shaun Cramp‐
ton, Spike Curtis, Alexis Richardson, Ilya Dmitrichenko, Casey Bisson, Thijs
Schnitger, Sheng Liang, Timo Derstappen, Puja Abbassi, Alexander Larsson, and Kel‐
sey Hightower. For allowing me to reuse monsterid.js, I would like to thank Kevin
Gaudin.
For all their help, I would like to thank the O’Reilly staff, in particular my editor Brian
Anderson and Meghan Blanchette, for starting the whole process.
Diogo Mónica and Mark Coleman—thanks to both of you for answering my last-
minute plea for help.
A particular shout-out has to go to two companies: Container Solutions and Cloud‐
Soft. Jamie Dobson and Container Solutions kept me busy blogging and speaking at
events, and put me in contact with several people who had an impact on this book.
CloudSoft graciously allowed me to use their office during the writing of this book
and hosted the Edinburgh Docker meetup, both of which were very important to me.
For putting up with my obsession and moaning over the book, I would like to thank
all my friends and family; you know who you are (and are unlikely to read this any‐
way).
Finally, I would like to thank the BBC 6 Music DJs who provided the soundtrack to
this book, including Lauren Laverne, Radcliffe and Maconie, Shaun Keaveny, and
Iggy Pop.
Preface | xv
www.it-ebooks.info
www.it-ebooks.info
PART I
Background and Basics
In the first part of this book, we’ll start by taking look at what containers are and why
they are becoming so popular. This is followed by an introduction to Docker and the
key concepts you need to understand to make the most of containers.
www.it-ebooks.info
www.it-ebooks.info
CHAPTER 1
The What and Why of Containers
Containers are fundamentally changing the way we develop, distribute, and run soft‐
ware. Developers can build software locally, knowing that it will run identically
regardless of host environment—be it a rack in the IT department, a user’s laptop, or
a cluster in the cloud. Operations engineers can concentrate on networking, resour‐
ces, and uptime and spend less time configuring environments and battling system
dependencies. The use and uptake of containers is increasing at a phenomenal rate
across the industry, from the smallest start ups to large-scale enterprises. Developers
and operations engineers should expect to regularly use containers in some fashion
within the next few years.
Containers are an encapsulation of an application with its dependencies. At first
glance, they appear to be just a lightweight form of virtual machines (VMs)—like a
VM, a container holds an isolated instance of an operating system (OS), which we
can use to run applications.
However, containers have several advantages that enable use cases that are difficult or
impossible with traditional VMs:
• Containers share resources with the host OS, which makes them an order of
magnitude more efficient. Containers can be started and stopped in a fraction of
a second. Applications running in containers incur little to no overhead com‐
pared to applications running natively on the host OS.
• The portability of containers has the potential to eliminate a whole class of bugs
caused by subtle changes in the running environment—it could even put an end
to the age-old developer refrain of “but it works on my machine!”
• The lightweight nature of containers means developers can run dozens of con‐
tainers at the same time, making it possible to emulate a production-ready dis‐
3
www.it-ebooks.info
1 The diagram depicts a type 2 hypervisor, such as Virtualbox or VMWare Workstation, which runs on top of a
host OS. Type 1 hypervisors, such as Xen, are also available where the hypervisor runs directly on top of the
bare metal.
2 The kernel is the core component in an OS and is responsible for providing applications with essential system
functions related to memory, CPU, and device access. A full OS consists of the kernel plus various system
programs, such as init systems, compilers, and window managers.
tributed system. Operations engineers can run many more containers on a single
host machine than using VMs alone.
• Containers also have advantages for end users and developers outside of deploy‐
ing to the cloud. Users can download and run complex applications without
needing to spend hours on configuration and installation issues or worrying
about the changes required to their system. In turn, the developers of such appli‐
cations can avoid worrying about differences in user environments and the avail‐
ability of dependencies.
More importantly, the fundamental goals of VMs and containers are different—the
purpose of a VM is to fully emulate a foreign environment, while the purpose of a
container is to make applications portable and self-contained.
Containers Versus VMs
Though containers and VMs seem similar at first, there are some important differ‐
ences, which are easiest to explain using diagrams.
Figure 1-1 shows three applications running in separate VMs on a host. The hypervi‐
sor1
is required to create and run VMs, controlling access to the underlying OS and
hardware as well as interpreting system calls when necessary. Each VM requires a full
copy of the OS, the application being run, and any supporting libraries.
In contrast, Figure 1-2 shows how the same three applications could be run in a con‐
tainerized system. Unlike VMs, the host’s kernel2
is shared with the running contain‐
ers. This means that containers are always constrained to running the same kernel as
the host. Applications Y and Z use the same libraries and can share this data rather
than having redundant copies. The container engine is responsible for starting and
stopping containers in a similar way to the hypervisor on a VM. However, processes
running inside containers are equivalent to native processes on the host and do not
incur the overheads associated with hypervisor execution.
Both VMs and containers can be used to isolate applications from other applications
running on the same host. VMs have an added degree of isolation from the hypervi‐
sor and are a trusted and battle-hardened technology. Containers are comparatively
new, and many organizations are hesitant to completely trust the isolation features of
containers before they have a proven track record. For this reason, it is common to
4 | Chapter 1: The What and Why of Containers
www.it-ebooks.info
find hybrid systems with containers running inside VMs in order to take advantage
of both technologies.
Figure 1-1. Three VMs running on a single host
Figure 1-2. Three containers running on a single host
Containers Versus VMs | 5
www.it-ebooks.info
3 OpenVZ never achieved mass adoption, possibly because of the requirement to run a patched kernel.
Docker and Containers
Containers are an old concept. For decades, UNIX systems have had the chroot com‐
mand that provides a simple form of filesystem isolation. Since 1998, FreeBSD has
had the jail utility, which extended chroot sandboxing to processes. Solaris Zones
offered a comparatively complete containerization technology around 2001 but was
limited to the Solaris OS. Also in 2001, Parrallels Inc, (then SWsoft) released the
commercial Virtuozzo container technology for Linux and later open sourced the
core technology as OpenVZ in 2005.3
Then Google started the development of
CGroups for the Linux kernel and began moving its infrastructure to containers. The
Linux Containers (LXC) project started in 2008 and brought together CGroups, ker‐
nel namespaces, and chroot technology (among others) to provide a complete con‐
tainerization solution. Finally, in 2013, Docker brought the final pieces to the
containerization puzzle, and the technology began to enter the mainstream.
Docker took the existing Linux container technology and wrapped and extended it in
various ways—primarily through portable images and a user-friendly interface—to
create a complete solution for the creation and distribution of containers. The Docker
platform has two distinct components: the Docker Engine, which is responsible for
creating and running containers; and the Docker Hub, a cloud service for distributing
containers.
The Docker Engine provides a fast and convenient interface for running containers.
Before this, running a container using a technology such as LXC required significant
specialist knowledge and manual work. The Docker Hub provides an enormous
number of public container images for download, allowing users to quickly get
started and avoid duplicating work already done by others. Further tooling developed
by Docker includes Swarm, a clustering manager; Kitematic, a GUI for working with
containers; and Machine, a command-line utility for provisioning Docker hosts.
By open sourcing the Docker Engine, Docker was able to grow a large community
around Docker and take advantage of public help with bug fixes and enhancements.
The rapid rise of Docker meant that it effectively became a de facto standard, which
led to industry pressure to move to develop independent formal standards for the
container runtime and format. In 2015, this culminated in the establishment of the
Open Container Initiative, a “governance structure” sponsored by Docker, Microsoft,
CoreOS, and many other important organizations, whose mission is to develop such
a standard. Docker’s container format and runtime forms the basis of the effort.
The uptake of containers has largely been driven by developers, who for the first time
were given the tools to use containers effectively. The fast start-up time of Docker
6 | Chapter 1: The What and Why of Containers
www.it-ebooks.info
4 This originally stood for Linux, Apache, MySQL, and PHP—common components in a web application.
containers is essential to developers who crave quick and iterative development cycles
where they can promptly see the results of code changes. The portability and isolation
guarantees of containers ease collaboration with other developers and operations;
developers can be sure their code will work across environments, and operations can
focus on hosting and orchestrating containers rather than worrying about the code
running inside them.
The changes brought about by Docker are significantly changing the way we develop
software. Without Docker, containers would have remained in the shadows of IT for
a long time to come.
The Shipping Metaphor
The Docker philosophy is often explained in terms of a shipping-container metaphor,
which presumably explains the Docker name. The story normally goes something like
this:
When goods are transported, they have to pass through a variety of different means,
possibly including trucks, forklifts, cranes, trains, and ships. These means have to be
able to handle a wide variety of goods of different sizes and with different require‐
ments (e.g., sacks of coffee, drums of hazardous chemicals, boxes of electronic goods,
fleets of luxury cars, and racks of refrigerated lamb). Historically, this was a cumber‐
some and costly process, requiring manual labor, such as dock workers, to load and
unload items by hand at each transit point (Figure 1-3).
The transport industry was revolutionized by the introduction of the intermodal con‐
tainer. These containers come in standard sizes and are designed to be moved
between modes of transport with a minimum of manual labor. All transport machi‐
nery is designed to handle these containers, from the forklifts and cranes to the
trucks, trains, and ships. Refrigerated and insulated containers are available for trans‐
porting temperature sensitive goods, such as food and pharmaceuticals. The benefits
of standardization also extend to other supporting systems, such as the labeling and
sealing of containers. This means the transport industry can let the producers of
goods worry about the contents of the containers so that it can focus on the move‐
ment and storage of the containers themselves.
The goal of Docker is to bring the benefits of container standardization to IT. In
recent years, software systems have exploded in terms of diversity. Gone are the days
of a LAMP4
stack running on a single machine. A typical modern system may include
Javascript frameworks, NoSQL databases, message queues, REST APIs, and backends
all written in a variety of programming languages. This stack has to run partly or
completely on top of a variety of hardware—from the developer’s laptop and the in-
house testing cluster to the production cloud provider. Each of these environments is
Docker and Containers | 7
www.it-ebooks.info
different, running different operating systems with different versions of libraries on
different hardware. In short, we have a similar issue to the one seen by the transport
industry—we have to continually invest substantial manual effort to move code
between environments. Much as the intermodal containers simplified the transporta‐
tion of goods, Docker containers simplify the transportation of software applications.
Developers can concentrate on building the application and shipping it through test‐
ing and production without worrying about differences in environment and depen‐
dencies. Operations can focus on the core issues of running containers, such as
allocating resources, starting and stopping containers, and migrating them between
servers.
Figure 1-3. Dockers working in Bristol, England, in 1940 (by Ministry of Information
Photo Division Photographer)
Docker: A History
In 2008, Solomon Hykes founded dotCloud to build a language-agnostic Plaftform-
as-a-Service (PaaS) offering. The language-agnostic aspect was the unique selling
point for dotCloud—existing PaaSs were tied to particular sets of languages (e.g.,
8 | Chapter 1: The What and Why of Containers
www.it-ebooks.info
Heroku supported Ruby, and Google App Engine supported Java and Python). In
2010, dotCloud took part in Y Combinator accelerator program, where it was were
exposed to new partners and began to attract serious investment. The major turning
point came in March 2013, when dotCloud open sourced Docker, the core building
block of dotCloud. While some companies may have been scared that they were giv‐
ing away their magic beans, dotCloud recognized that Docker would benefit enor‐
mously from becoming a community-driven project.
Early versions of Docker were little more than a wrapper around LXC paired with a
union filesystem, but the uptake and speed of development was shockingly fast.
Within six months, it had more than 6,700 stars on GitHub and 175 nonemployee
contributors. This led dotCloud to change its name to Docker, Inc. and to refocus its
business model. Docker 1.0 was announced in June 2014, just 15 months after the 0.1
release. Docker 1.0 represented a major jump in stability and reliability—it was now
declared “production ready,” although it had already seen production use in several
companies, including Spotify and Baidu. At the same time, Docker started moving
toward being a complete platform rather than just a container engine, with the launch
of the Docker Hub, a public repository for containers.
Other companies were quick to see the potential of Docker. Red Hat became a major
partner in September 2013 and started using Docker to power its OpenShift cloud
offering. Google, Amazon, and DigitalOcean were quick to offer Docker support on
their clouds, and several startups began specializing in Docker hosting, such as Stack‐
Dock. In October 2014, Microsoft announced that future versions of Windows Server
would support Docker, representing a huge shift in positioning for a company tradi‐
tionally associated with bloated enterprise software.
DockerConEU in December 2014 saw the announcement of Docker Swarm, a clus‐
tering manager for Docker and Docker Machine, a CLI tool for provisioning Docker
hosts. This was a clear signal of Docker’s intention to provide a complete and integra‐
ted solution for running containers and not allowing themselves to be restricted to
only providing the Docker engine.
Also that December, CoreOS announced the development of rkt, its own container
runtime, and the development of the appc container specification. In June 2015, dur‐
ing DockerCon in San Francisco, Solomon Hykes from Docker and Alex Polvi from
CoreOS announced the formation of the Open Container Initiative (then called the
Open Container Project) to develop a common standard for container formats and
runtimes.
Also in June 2015, the FreeBSD project announced that Docker was now supported
on FreeBSD, using ZFS and the Linux compatibility layer. In August 2015, Docker
and Microsoft released a “tech preview” of the Docker Engine for Windows server.
Docker: A History | 9
www.it-ebooks.info
5 Personally, I’ve never liked the phrase; all batteries provide much the same functionality and can only be
swapped with batteries of the same size and voltage. I assume the phrase has its origins in Python’s “Batteries
Included” philosophy, which it uses to describe the extensive standard library that ships with Python.
With the release of Docker 1.8, Docker introduced the content trust feature, which
verifies the integrity and publisher of Docker images. Content trust is a critical com‐
ponent for building trusted workflows based on images retrieved from Docker regis‐
tries.
Plugins and Plumbing
As a company, Docker Inc. has always been quick to recognize it owes a lot of its suc‐
cess to the ecosystem. While Docker Inc. was concentrating on producing a stable,
production-ready version of the container engine, other companies such as CoreOS,
WeaveWorks, and ClusterHQ were working on related areas, such as orchestrating
and networking containers. However, it quickly became clear that Docker Inc., was
planning to provide a complete platform out of the box, including networking, stor‐
age, and orchestration capabilities. In order to encourage continued ecosystem
growth and ensure users had access to solutions for a wide range of use cases, Docker
Inc. announced it would create a modular, extensible framework for Docker where
stock components could be swapped out for third-party equivalents or extended with
third-party functionality. Docker Inc. called this philosophy “Batteries Included, But
Replaceable,” meaning that a complete solution would be provided, but parts could be
swapped out.5
At the time of writing, the plugin infrastructure is in its infancy, but is available.
There are several plugins already available for networking containers and data man‐
agement.
Docker also follows what it calls the “Infrastructure Plumbing Manifesto,” which
underlines its commitment to reusing and improving existing infrastructure compo‐
nents where possible and contributing reusable components back to the community
when new tools are required. This led to the spinning out of the low-level code for
running containers into the runC project, which is overseen by the OCI and can be
reused as the basis for other container platforms.
64-Bit Linux
At the time of writing, the only stable, production-ready platform for Docker is 64-bit
Linux. This means your computer will need to run a 64-bit Linux distribution, and all
your containers will also be 64-bit Linux. If you are a Windows or Mac OS user, you
can run Docker inside a VM.
10 | Chapter 1: The What and Why of Containers
www.it-ebooks.info
Support for other native containers on other platforms, including BSD, Solaris, and
Windows Server, is in various stages of development. Since Docker does not natively
do any virtualization, containers must always match the host kernel—a Windows
Server container can only run on a Windows Server host, and a 64-bit Linux con‐
tainer will only run on a 64-bit Linux host.
Microservices and Monoliths
One of the biggest use cases and strongest drivers behind the uptake of containers are
microservices.
Microservices are a way of developing and composing software systems such that
they are built out of small, independent components that interact with one another
over the network. This is in contrast to the traditional monolithic way of developing
software, where there is a single large program, typically written in C++ or Java.
When it comes to scaling a monolith, commonly the only choice is to scale up, where
extra demand is handled by using a larger machine with more RAM and CPU power.
Conversely, microservices are designed to scale out, where extra demand is handled
by provisioning multiple machines the load can be spread over. In a microservice
architecture, it’s possible to only scale the resources required for a particular service,
focusing on the bottlenecks in the system. In a monolith, it’s scale everything or noth‐
ing, resulting in wasted resources.
In terms of complexity, microservices are a double-edged sword. Each individual
microservice should be easy to understand and modify. However, in a system com‐
posed of dozens or hundreds of such services, the overall complexity increases due to
the interaction between individual components.
The lightweight nature and speed of containers mean they are particularly well suited
for running a microservice architecture. Compared to VMs, containers are vastly
smaller and quicker to deploy, allowing microservice architectures to use the mini‐
mum of resources and react quickly to changes in demand.
For more information on microservices, see Building Microservices by Sam Newman
(O’Reilly) and Martin Fowler’s Microservice Resource Guide.
64-Bit Linux | 11
www.it-ebooks.info
Other documents randomly have
different content
when he feels he cannot die, And knows
himself no vision to himself, Nor the high God a
vision, nor that One Who rose again”; The
Ancient Sage, 548—“Thou canst not prove the
Nameless, O my son! Nor canst thou prove the
world thou movest in. Thou canst not prove
that thou art body alone, Nor canst Thou prove
that thou art spirit alone, Nor canst thou prove
that thou art both in one. Thou canst not prove
that thou art immortal, no, Nor yet that thou
art mortal. Nay, my son, thou canst not prove
that I, who speak with thee, Am not thyself in
converse with thyself. For nothing worthy
proving can be proven, Nor yet disproven:
Wherefore be thou wise, Cleave ever to the
sunnier side of doubt, And cling to Faith beyond
the forms of Faith.”
III. Other Supposed Sources of our Idea of God's
Existence.
Our proof that the idea of God's existence is a
rational intuition will not be complete, until we show
that attempts to account in other ways for the origin
of the idea are insufficient, and require as their
presupposition the very intuition which they would
supplant or reduce to a secondary place. We claim
that it cannot be derived from any other source than
an original cognitive power of the mind.
1. Not from external revelation,—whether
communicated (a) through the Scriptures, or
(b)through tradition; for, unless man had from
another source a previous knowledge of the
existence of a God from whom such a revelation
might come, the revelation itself could have no
authority for him.
(a) See Gillespie, Necessary Existence of God,
10; Ebrard, Dogmatik, 1:117; H. B. Smith, Faith
and Philosophy, 18—“A revelation takes for
granted that he to whom it is made has some
knowledge of God, though it may enlarge and
purify that knowledge.” We cannot prove God
from the authority of the Scriptures, and then
also prove the Scriptures from the authority of
God. The very idea of Scripture as a revelation
presupposes belief in a God who can make it.
Newman Smyth, in New Englander, 1878:355—
We cannot derive from a sun-dial our
knowledge of the existence of a sun. The sun-
dial presupposes the sun, and cannot be
understood without previous knowledge of the
sun. Wuttke, Christian Ethics, 2:103—“The
voice of the divine ego does not first come to
the consciousness of the individual ego from
without; rather does every external revelation
presuppose already this inner one; there must
echo out from within man something kindred to
the outer revelation, in order to its being
recognized and accepted as divine.”
Fairbairn, Studies in Philos. of Relig. and Hist.,
21, 22—“If man is dependent on an outer
revelation for his idea of God, then he must
have what Schelling happily termed [pg 063]
‘an original atheism of consciousness.’ Religion
cannot, in that case, be rooted in the nature of
man,—it must be implanted from without.”
Schurman, Belief in God, 78—“A primitive
revelation of God could only mean that God had
endowed man with the capacity of
apprehending his divine original. This capacity,
like every other, is innate, and like every other,
it realizes itself only in the presence of
appropriate conditions.”Clarke, Christian
Theology, 112—“Revelation cannot demonstrate
God's existence, for it must assume it; but it
will manifest his existence and character to
men, and will serve them as the chief source of
certainty concerning him, for it will teach them
what they could not know by other means.”
(b) Nor does our idea of God come primarily
from tradition, for “tradition can perpetuate
only what has already been originated”
(Patton). If the knowledge thus handed down is
the knowledge of a primitive revelation, then
the argument just stated applies—that very
revelation presupposed in those who first
received it, and presupposes in those to whom
it is handed down, some knowledge of a Being
from whom such a revelation might come. If
the knowledge thus handed down is simply
knowledge of the results of the reasonings of
the race, then the knowledge of God comes
originally from reasoning—an explanation which
we consider further on. On the traditive theory
of religion, see Flint, Theism, 23, 338; Cocker,
Christianity and Greek Philosophy, 86-96;
Fairbairn, Studies in Philos. of Relig. and Hist.,
14, 15; Bowen, Metaph. and Ethics, 453, and in
Bib. Sac., Oct. 1876; Pfleiderer, Religionsphilos.,
312-322.
Similar answers must be returned to many
common explanations of man's belief in God:
“Primus in orbe deos fecit timor”; Imagination
made religion; Priests invented religion;
Religion is a matter of imitation and fashion.
But we ask again: What caused the fear? Who
made the imagination? What made priests
possible? What made imitation and fashion
natural? To say that man worships, merely
because he sees other men worshiping, is as
absurd as to say that a horse eats hay because
he sees other horses eating it. There must be a
hunger in the soul to be satisfied, or external
things would never attract man to worship.
Priests could never impose upon men so
continuously, unless there was in human nature
a universal belief in a God who might
commission priests as his representatives.
Imagination itself requires some basis of reality,
and a larger basis as civilization advances. The
fact that belief in God's existence gets a wider
hold upon the race with each added century,
shows that, instead of fear having caused belief
in God, the truth is that belief in God has
caused fear; indeed, “the fear of Jehovah is the
beginning of wisdom” (Ps. 111:10).
2. Not from experience,—whether this mean (a) the
sense-perception and reflection of the individual
(Locke), (b) the accumulated results of the
sensations and associations of past generations of
the race (Herbert Spencer), or (c) the actual contact
of our sensitive nature with God, the supersensible
reality, through the religious feeling (Newman
Smyth).
The first form of this theory is inconsistent with the
fact that the idea of God is not the idea of a sensible
or material object, nor a combination of such ideas.
Since the spiritual and infinite are direct opposites of
the material and finite, no experience of the latter
can account for our idea of the former.
With Locke (Essay on Hum. Understanding,
2:1:4), experience is the passive reception of
ideas by sensation or by reflection. Locke's
“tabula rasa” theory mistakes the occasion of
our primitive ideas for their cause. To his
statement: “Nihil est in intellectu nisi quod ante
fuerit in sensu,” Leibnitz replied: “Nisi
intellectus ipse.”Consciousness is sometimes
called the source of our knowledge of God. But
consciousness, as simply an accompanying
knowledge of ourselves and our states, is not
properly the source of any other knowledge.
The German Gottesbewusstsein = not
“consciousness of God,” but “knowledge of
God”; Bewusstsein here = not a
“conknowing,”but a “beknowing”; see Porter,
Human Intellect, 86; Cousin, True, Beautiful
and Good, 48, 49.
Fraser, Locke, 143-147—Sensations are the
bricks, and association the mortar, of the
mental house. Bowne, Theory of Thought and
Knowledge, 47—“Develope language by
allowing sounds to associate and evolve
meaning for themselves? Yet this is the exact
parallel of the philosophy which aims to build
intelligence out of sensation....52—One [pg
064]who does not know how to read would
look in vain for meaning in a printed page, and
in vain would he seek to help his failure by
using strong spectacles.”Yet even if the idea of
God were a product of experience, we should
not be warranted in rejecting it as irrational.
See Brooks, Foundations of Zoölogy, 132
—“There is no antagonism between those who
attribute knowledge to experience and those
who attribute it to our innate reason; between
those who attribute the development of the
germ to mechanical conditions and those who
attribute it to the inherent potency of the germ
itself; between those who hold that all nature
was latent in the cosmic vapor and those who
believe that everything in nature is immediately
intended rather than predetermined.” All these
may be methods of the immanent God.
The second form of the theory is open to the
objection that the very first experience of the first
man, equally with man's latest experience,
presupposes this intuition, as well as the other
intuitions, and therefore cannot be the cause of it.
Moreover, even though this theory of its origin were
correct, it would still be impossible to think of the
object of the intuition as not existing, and the
intuition would still represent to us the highest
measure of certitude at present attainable by man. If
the evolution of ideas is toward truth instead of
falsehood, it is the part of wisdom to act upon the
hypothesis that our primitive belief is veracious.
Martineau, Study, 2:26—“Nature is as worthy of
trust in her processes, as in her gifts.” Bowne,
Examination of Spencer, 163, 164—“Are we to
seek truth in the minds of pre-human apes, or
in the blind stirrings of some primitive pulp? In
that case we can indeed put away all our
science, but we must put away the great
doctrine of evolution along with it. The
experience-philosophy cannot escape this
alternative: either the positive deliverances of
our mature consciousness must be accepted as
they stand, or all truth must be declared
impossible.” See also Harris, Philos. Basis
Theism, 137-142.
Charles Darwin, in a letter written a year before
his death, referring to his doubts as to the
existence of God, asks: “Can we trust to the
convictions of a monkey's mind?” We may
reply: “Can we trust the conclusions of one
who was once a baby?” Bowne, Ethics, 3—“The
genesis and emergence of an idea are one
thing; its validity is quite another. The logical
value of chemistry cannot be decided by
reciting its beginnings in alchemy; and the
logical value of astronomy is independent of the
fact that it began in astrology.... 11—Even if
man came from the ape, we need not tremble
for the validity of the multiplication-table or of
the Golden Rule. If we have moral insight, it is
no matter how we got it; and if we have no
such insight, there is no help in any
psychological theory.... 159—We must not
appeal to savages and babies to find what is
natural to the human mind.... In the case of
anything that is under the law of development
we can find its true nature, not by going back
to its crude beginnings, but by studying the
finished outcome.” Dawson, Mod. Ideas of
Evolution, 13—“If the idea of God be the
phantom of an apelike brain, can we trust to
reason or conscience in any other matter? May
not science and philosophy themselves be
similar phantasies, evolved by mere chance and
unreason?” Even though man came from the
ape, there is no explaining his ideas by the
ideas of the ape: “A man 's a man for a' that.”
We must judge beginnings by endings, not
endings by beginnings. It matters not how the
development of the eye took place nor how
imperfect was the first sense of sight, if the eye
now gives us correct information of external
objects. So it matters not how the intuitions of
right and of God originated, if they now give us
knowledge of objective truth. We must take for
granted that evolution of ideas is not from
sense to nonsense. G. H. Lewes, Study of
Psychology, 122—“We can understand the
amœba and the polyp only by a light reflected
from the study of man.” Seth, Ethical Principles,
429—“The oak explains the acorn even more
truly than the acorn explains the oak.”
Sidgwick: “No one appeals from the artist's
sense of beauty to the child's. Higher
mathematics are no less true, because they can
be apprehended only by trained intellect. No
strange importance attaches to what was first
felt or thought.” Robert Browning, Paracelsus:
“Man, once descried, imprints forever His
presence on all lifeless things.... A
supplementary reflux of light Illustrates all the
inferior grades, explains Each back step in the
circle.” Man, with his higher ideas, shows the
meaning and content of all that led up to him.
He is the last round of the ascending ladder,
and from this highest product and from his
ideas we may infer what his Maker is.
[pg 065]
Bixby, Crisis in Morals, 162, 245—“Evolution
simply gave man such height that he could at
last discern the stars of moral truth which had
previously been below the horizon. This is very
different from saying that moral truths are
merely transmitted products of the experiences
of utility.... The germ of the idea of God, as of
the idea of right, must have been in man just
so soon as he became man,—the brute's
gaining it turned him into man. Reason is not
simply a register of physical phenomena and of
experiences of pleasure and pain: it is creative
also. It discerns the oneness of things and the
supremacy of God.” Sir Charles Lyell: “The
presumption is enormous that all our faculties,
though liable to err, are true in the main and
point to real objects. The religious faculty in
man is one of the strongest of all. It existed in
the earliest ages, and instead of wearing out
before advancing civilization, it grows stronger
and stronger, and is to-day more developed
among the highest races than it ever was
before. I think we may safely trust that it points
to a great truth.” Fisher, Nat. and Meth. of Rev.,
137, quotes Augustine: “Securus judicat orbis
terrarum,”and tells us that the intellect is
assumed to be an organ of knowledge,
however the intellect may have been evolved.
But if the intellect is worthy of trust, so is the
moral nature. George A. Gordon, The Christ of
To-day, 103—“To Herbert Spencer, human
history is but an incident of natural history, and
force is supreme. To Christianity nature is only
the beginning, and man the consummation.
Which gives the higher revelation of the life of
the tree—the seed, or the fruit?”
The third form of the theory seems to make God a
sensuous object, to reverse the proper order of
knowing and feeling, to ignore the fact that in all
feeling there is at least some knowledge of an
object, and to forget that the validity of this very
feeling can be maintained only by previously
assuming the existence of a rational Deity.
Newman Smyth tells us that feeling comes first;
the idea is secondary. Intuitive ideas are not
denied, but they are declared to be direct
reflections, in thought, of the feelings. They are
the mind's immediate perception of what it
feels to exist. Direct knowledge of God by
intuition is considered to be idealistic, reaching
God by inference is regarded as rationalistic, in
its tendency. See Smyth, The Religious Feeling;
reviewed by Harris, in New Englander, Jan.,
1878: reply by Smyth, in New Englander, May,
1878.
We grant that, even in the case of
unregenerate men, great peril, great joy, great
sin often turn the rational intuition of God into a
presentative intuition. The presentative
intuition, however, cannot be affirmed to be
common to all men. It does not furnish the
foundation or explanation of a universal
capacity for religion. Without the rational
intuition, the presentative would not be
possible, since it is only the rational that
enables man to receive and to interpret the
presentative. The very trust that we put in
feeling presupposes an intuitive belief in a true
and good God. Tennyson said in 1869: “Yes, it
is true that there are moments when the flesh
is nothing to me; when I know and feel the
flesh to be the vision; God and the spiritual is
the real; it belongs to me more than the hand
and the foot. You may tell me that my hand
and my foot are only imaginary symbols of my
existence,—I could believe you; but you never,
never can convince me that the I is not an
eternal Reality, and that the spiritual is not the
real and true part of me.”
3. Not from reasoning,—because
(a) The actual rise of this knowledge in the great
majority of minds is not the result of any conscious
process of reasoning. On the other hand, upon
occurrence of the proper conditions, it flashes upon
the soul with the quickness and force of an
immediate revelation.
(b) The strength of men's faith in God's existence is
not proportioned to the strength of the reasoning
faculty. On the other hand, men of greatest logical
power are often inveterate sceptics, while men of
unwavering faith are found among those who cannot
even understand the arguments for God's existence.
(c) There is more in this knowledge than reasoning
could ever have [pg 066] furnished. Men do not limit
their belief in God to the just conclusions of
argument. The arguments for the divine existence,
valuable as they are for purposes to be shown
hereafter, are not sufficient by themselves to warrant
our conviction that there exists an infinite and
absolute Being. It will appear upon examination that
the a priori argument is capable of proving only an
abstract and ideal proposition, but can never conduct
us to the existence of a real Being. It will appear that
the a posteriori arguments, from merely finite
existence, can never demonstrate the existence of
the infinite. In the words of Sir Wm. Hamilton
(Discussions, 23)—“A demonstration of the absolute
from the relative is logically absurd, as in such a
syllogism we must collect in the conclusion what is
not distributed in the premises”—in short, from finite
premises we cannot draw an infinite conclusion.
Whately, Logic, 290-292; Jevons, Lessons in
Logic, 81; Thompson, Outline Laws of Thought,
sections 82-92; Calderwood, Philos. of Infinite,
60-69, and Moral Philosophy, 238; Turnbull, in
Bap. Quarterly, July, 1872:271; Van Oosterzee,
Dogmatics, 239; Dove, Logic of Christian Faith,
21. Sir Wm. Hamilton: “Departing from the
particular, we admit that we cannot, in our
highest generalizations, rise above the finite.”
Dr. E. G. Robinson: “The human mind turns out
larger grists than are ever put in at the
hopper.”There is more in the idea of God than
could have come out so small a knot-hole as
human reasoning. A single word, a chance
remark, or an attitude of prayer, suggests the
idea to a child. Helen Keller told Phillips Brooks
that she had always known that there was a
God, but that she had not known his name.
Ladd, Philosophy of Mind, 119—“It is a foolish
assumption that nothing can be certainly known
unless it be reached as the result of a conscious
syllogistic process, or that the more
complicated and subtle this process is, the
more sure is the conclusion. Inferential
knowledge is always dependent upon the
superior certainty of immediate
knowledge.”George M. Duncan, in Memorial of
Noah Porter, 246—“All deduction rests either on
the previous process of induction, or on the
intuitions of time and space which involve the
Infinite and Absolute.”
(d) Neither do men arrive at the knowledge of God's
existence by inference; for inference is condensed
syllogism, and, as a form of reasoning, is equally
open to the objection just mentioned. We have seen,
moreover, that all logical processes are based upon
the assumption of God's existence. Evidently that
which is presupposed in all reasoning cannot itself be
proved by reasoning.
By inference, we of course mean mediate
inference, for in immediate inference (e. g., “All
good rulers are just; therefore no unjust rulers
are good”) there is no reasoning, and no
progress in thought. Mediate inference is
reasoning—is condensed syllogism; and what is
so condensed may be expanded into regular
logical form. Deductive inference: “A negro is a
fellow-creature; therefore he who strikes a
negro strikes a fellow-creature.”Inductive
inference: “The first finger is before the
second; therefore it is before the third.” On
inference, see Martineau, Essays, 1:105-108;
Porter, Human Intellect, 444-448; Jevons,
Principles of Science, 1:14, 136-139, 168, 262.
Flint, in his Theism, 77, and Herbert, in his
Mod. Realism Examined, would reach the
knowledge of God's existence by inference. The
latter says God is not demonstrable, but his
existence is inferred, like the existence of our
fellow men. But we reply that in this last case
we infer only the finite from the finite, while the
difficulty in the case of God is in inferring the
infinite from the finite. This very process of
reasoning, moreover, presupposes the existence
of God as the absolute Reason, in the way
already indicated.
Substantially the same error is committed by H.
B. Smith, Introd. to Chr. Theol., 84-133, and by
Diman, Theistic Argument, 316, 364, both of
whom grant an intuitive element, but use it
only to eke out the insufficiency of reasoning.
They consider that the intuition gives us only an
abstract idea, which contains in itself no
voucher for the existence [pg 067]of an
actual being corresponding to the idea, and
that we reach real being only by inference from
the facts of our own spiritual natures and of the
outward world. But we reply, in the words of
McCosh, that “the intuitions are primarily
directed to individual objects.” We know, not
the infinite in the abstract, but infinite space
and time, and the infinite God. See McCosh,
Intuitions, 26, 199, who, however, holds the
view here combated.
Schurman, Belief in God, 43—“I am unable to
assign to our belief in God a higher certainty
than that possessed by the working hypotheses
of science.... 57—The nearest approach made
by science to our hypothesis of the existence of
God lies in the assertion of the universality of
law ... based on the conviction of the unity and
systematic connection of all reality.... 64—This
unity can be found only in self-conscious spirit.”
The fault of this reasoning is that it gives us
nothing necessary or absolute. Instances of
working hypotheses are the nebular hypothesis
in astronomy, the law of gravitation, the atomic
theory in chemistry, the principle of evolution.
No one of these is logically independent or
prior. Each of them is provisional, and each may
be superseded by new discovery. Not so with
the idea of God. This idea is presupposed by all
the others, as the condition of every mental
process and the guarantee of its validity.
IV. Contents of this Intuition.
1. In this fundamental knowledge that God is, it is
necessarily implied that to some extent men know
intuitively what God is, namely, (a) a Reason in
which their mental processes are grounded; (b) a
Power above them upon which they are dependent;
(c) a Perfection which imposes law upon their moral
natures; (d) a Personality which they may recognize
in prayer and worship.
In maintaining that we have a rational intuition of
God, we by no means imply that a presentative
intuition of God is impossible. Such a presentative
intuition was perhaps characteristic of unfallen man;
it does belong at times to the Christian; it will be the
blessing of heaven (Mat. 5:8—“the pure in heart ...
shall see God”; Rev. 22:4—“they shall see his face”).
Men's experiences of face-to-face apprehension of
God, in danger and guilt, give some reason to
believe that a presentative knowledge of God is the
normal condition of humanity. But, as this
presentative intuition of God is not in our present
state universal, we here claim only that all men have
a rational intuition of God.
It is to be remembered, however, that the loss of
love to God has greatly obscured even this rational
intuition, so that the revelation of nature and the
Scriptures is needed to awaken, confirm and enlarge
it, and the special work of the Spirit of Christ to
make it the knowledge of friendship and communion.
Thus from knowing about God, we come to know
God (John 17:3—“This is life eternal, that they
should know thee”; 2 Tim. 1:12—“I know him whom
I have believed”).
Plato said, for substance, that there can be no
ὅτι οἶδεν without something of the ἁ οἶδεν.
Harris, Philosophical Basis of Theism, 208—“By
rational intuition man knows that absolute
Being exists; his knowledge of what it is, is
progressive with his progressive knowledge of
man and of nature.” Hutton, Essays: “A
haunting presence besets man behind and
before. He cannot evade it. It gives new
meanings to his thoughts, new terror to his
sins. It becomes intolerable. He is moved to set
up some idol, carved out of his own nature,
that will take its place—a non-moral God who
will not disturb his dream of rest. It is a
righteous Life and Will, and not the mere idea
of righteousness that stirs men so.” Porter,
Hum. Int., 661—“The Absolute is a thinking
Agent.” The intuition does not grow in
certainty; what grows is the mind's quickness in
applying it and power of expressing it. The
intuition is not complex; what is complex is the
Being intuitively cognized. See Calderwood,
Moral Philosophy, 232; Lowndes, Philos. [pg
068]of Primary Beliefs, 108-112; Luthardt,
Fund. Truths, 157—Latent faculty of speech is
called forth by speech of others; the choked-up
well flows again when debris is cleared away.
Bowen, in Bib. Sac., 33:740-754; Bowne,
Theism, 79.
Knowledge of a person is turned into personal
knowledge by actual communication or
revelation. First, comes the intuitive knowledge
of God possessed by all men—the assumption
that there exists a Reason, Power, Perfection,
Personality, that makes correct thinking and
acting possible. Secondly, comes the knowledge
of God's being and attributes which nature and
Scripture furnish. Thirdly, comes the personal
and presentative knowledge derived from
actual reconciliation and intercourse with God,
through Christ and the Holy Spirit. Stearns,
Evidence of Christian Experience, 208
—“Christian experience verifies the claims of
doctrine by experiment,—so transforming
probable knowledge into real knowledge.”
Biedermann, quoted by Pfleiderer, Grundriss, 18
—“God reveals himself to the human spirit, 1.
as its infinite Ground, in the reason; 2. as its
infinite Norm, in the conscience; 3. as its
infinite Strength, in elevation to religious truth,
blessedness, and freedom.”
Shall I object to this Christian experience,
because only comparatively few have it, and I
am not among the number? Because I have not
seen the moons of Jupiter, shall I doubt the
testimony of the astronomer to their existence?
Christian experience, like the sight of the
moons of Jupiter, is attainable by all. Clarke,
Christian Theology, 113—“One who will have
full proof of the good God's reality must put it
to the experimental test. He must take the
good God for real, and receive the confirmation
that will follow. When faith reaches out after
God, it finds him.... They who have found him
will be the sanest and truest of their kind, and
their convictions will be among the safest
convictions of man.... Those who live in
fellowship with the good God will grow in
goodness, and will give practical evidence of his
existence aside from their oral testimony.”
2. The Scriptures, therefore, do not attempt to prove
the existence of God, but, on the other hand, both
assume and declare that the knowledge that God is,
is universal (Rom. 1:19-21, 28, 32; 2:15). God has
inlaid the evidence of this fundamental truth in the
very nature of man, so that nowhere is he without a
witness. The preacher may confidently follow the
example of Scripture by assuming it. But he must
also explicitly declare it, as the Scripture does. “For
the invisible things of him since the creation of the
world are clearly seen” (καθορᾶται—spiritually
viewed); the organ given for this purpose is the νοῦς
(νοούμενα); but then—and this forms the transition
to our next division of the subject—they are
“perceived through the things that are made” (τοῖς
ποιήμασιν, Rom. 1:20).
On Rom. 1:19-21, see Weiss, Bib. Theol. des N.
T., 251, note; also commentaries of Meyer,
Alford, Tholuck, and Wordsworth; τὸ γνωστὸν
τοῦ θεοῦ = not “that which may be known”
(Rev. Vers.) but “that which is known” of God;
νοούμενα καθορᾶται = are clearly seen in that
they are perceived by the reason—νοούμενα
expresses the manner of the καθορᾶται
(Meyer); compare John 1:9; Acts 17:27; Rom.
1:28; 2:15. On 1 Cor. 15:34, see Calderwood,
Philos. of Inf., 466—ἀγνωσίαν Θεοῦ τινὲς ἔχουσι
= do not possess the specially exalted
knowledge of God which belongs to believers in
Christ (cf. 1 Jo. 4:7—“every one that loveth is
begotten of God, and knoweth God”). On Eph.
2:12, see Pope, Theology, 1:240—ἄθεοι ἐν τῷ
κόσμῳ is opposed to being in Christ, and
signifies rather forsaken of God, than denying
him or entirely ignorant of him. On Scripture
passages, see Schmid, Bib. Theol. des N. T.,
486; Hofmann, Schriftbeweis, 1:62.
E. G. Robinson: “The first statement of the
Bible is, not that there is a God, but that ‘In the
beginning God created the heavens and the
earth’ (Gen. 1:1). The belief in God never was
and never can be the result of logical
argument, else the Bible would give us
proofs.”Many texts relied upon as proofs of
God's existence are simply explications of the
idea of God, as for example: Ps. 94:9, 10—“He
that planted the ear, shall he not hear? He that
formed the eye, shall he not see? He that
chastiseth the nations, shall not he correct,
even he that teacheth man knowledge?”Plato
says that God holds the soul by its roots,—he
therefore does not need to demonstrate to the
soul the fact of his existence. Martineau, Seat
of Authority, 308, says well that Scripture and
preaching only interpret what is already in the
heart which it addresses: “Flinging a warm
breath on the inward oracles hid in invisible ink,
it renders [pg 069]them articulate and
dazzling as the handwriting on the wall. The
divine Seer does not convey to you his
revelation, but qualifies you to receive your
own. This mutual relation is possible only
through the common presence of God in the
conscience of mankind.”Shedd, Dogmatic
Theology, 1:195-220—“The earth and sky make
the same sensible impressions on the organs of
a brute that they do upon those of a man; but
the brute never discerns the ‘invisible things’ of
God, his ‘eternal power and godhood’ (Rom.
1:20).”
Our subconscious activity, so far as it is normal,
is under the guidance of the immanent Reason.
Sensation, before it results in thought, has in it
logical elements which are furnished by mind—
not ours, but that of the Infinite One. Christ,
the Revealer of God, reveals God in every
man's mental life, and the Holy Spirit may be
the principle of self-consciousness in man as in
God. Harris, God the Creator, tells us that “man
finds the Reason that is eternal and universal
revealing itself in the exercise of his own
reason.” Savage, Life after Death, 268—“How
do you know that your subliminal consciousness
does not tap Omniscience, and get at the facts
of the universe?”Savage negatives this
suggestion, however, and wrongly favors the
spirit-theory. For his own experience, see pages
295-329 of his book.
C. M. Barrows, in Proceedings of Soc. for
Psychical Research, vol. 12, part 30, pages 34-
36—“There is a subliminal agent. What if this is
simply one intelligent Actor, filling the universe
with his presence, as the ether fills space; the
common Inspirer of all mankind, a skilled
Musician, presiding over many pipes and keys,
and playing through each what music he will?
The subliminal self is a universal fountain of
energy, and each man is an outlet of the
stream. Each man's personal self is contained in
it, and thus each man is made one with every
other man. In that deep Force, the last fact
behind which analysis cannot go, all psychical
and bodily effects find their common origin.”
This statement needs to be qualified by the
assertion of man's ethical nature and distinct
personality; see section of this work on Ethical
Monism, in chapter III. But there is truth here
like that which Coleridge sought to express in
his Æolian Harp: “And what if all of animated
Nature Be but organic harps diversely framed,
That tremble into thought, as o'er them
sweeps, Plastic and vast, one intellectual
breeze, At once the soul of each, and God of
all?” See F. W. H. Myers, Human Personality.
Dorner, System of Theology, 1:75—“The
consciousness of God is the true fastness of our
self-consciousness.... Since it is only in the God-
conscious man that the innermost personality
comes to light, in like manner, by means of the
interweaving of that consciousness of God and
of the world, the world is viewed in God (‘sub
specie eternitatis’), and the certainty of the
world first obtains its absolute security for the
spirit.” Royce, Spirit of Mod. Philosophy,
synopsis in N. Y. Nation: “The one indubitable
fact is the existence of an infinite self, a Logos
or World-mind (345). That it exists is clear, I.
Because idealism shows that real things are
nothing more nor less than ideas, or
‘possibilities of experience’; but a mere
‘possibility’, as such, is nothing, and a world of
‘possible’ experiences, in so far as it is real,
must be a world of actual experience to some
self (367). If then there be a real world, it has
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
textbookfull.com

More Related Content

Similar to Using Docker Developing and Deploying Software with Containers 1st Edition Adrian Mouat (20)

PDF
Docker in Practice-Manning Publications (2019).pdf
aNDREUETgARCIA
 
PDF
Docker-in-Action 1st edition.pdf
aNDREUETgARCIA
 
PDF
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Codemotion
 
PDF
Docker In Action Second Edition 2nd Edition Jeff Nickoloff
chabokhewin
 
PDF
codemotion-docker-2014
Carlo Bonamico
 
PDF
Docker in real life
Nguyen Van Vuong
 
PDF
Docker up & running
Le Thi
 
PDF
Docker containerization cookbook
Pascal Louis
 
PDF
Docker basic
Somenath Ghosh
 
PDF
Docker
Neeraj Wadhwa
 
PPTX
Introduction to automated environment management with Docker Containers - for...
Lucas Jellema
 
PPTX
Docker In Brief
Ritu Kamthan
 
PPTX
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
PPTX
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
PPTX
Intro Docker october 2013
dotCloud
 
PPTX
Docker Ecosystem on Azure
Patrick Chanezon
 
PPTX
Docker introduction
dotCloud
 
PDF
docker.pdf
vivekpatnaik8
 
PDF
Continuous Integration with Docker on AWS
Andrew Heifetz
 
PPTX
Intro to Docker November 2013
Docker, Inc.
 
Docker in Practice-Manning Publications (2019).pdf
aNDREUETgARCIA
 
Docker-in-Action 1st edition.pdf
aNDREUETgARCIA
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Codemotion
 
Docker In Action Second Edition 2nd Edition Jeff Nickoloff
chabokhewin
 
codemotion-docker-2014
Carlo Bonamico
 
Docker in real life
Nguyen Van Vuong
 
Docker up & running
Le Thi
 
Docker containerization cookbook
Pascal Louis
 
Docker basic
Somenath Ghosh
 
Introduction to automated environment management with Docker Containers - for...
Lucas Jellema
 
Docker In Brief
Ritu Kamthan
 
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Intro Docker october 2013
dotCloud
 
Docker Ecosystem on Azure
Patrick Chanezon
 
Docker introduction
dotCloud
 
docker.pdf
vivekpatnaik8
 
Continuous Integration with Docker on AWS
Andrew Heifetz
 
Intro to Docker November 2013
Docker, Inc.
 

Recently uploaded (20)

PDF
'' IMPORTANCE OF EXCLUSIVE BREAST FEEDING ''
SHAHEEN SHAIKH
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PPTX
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Manage Promotions in Odoo 18 Sales
Celine George
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PDF
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
PPTX
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
PDF
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
'' IMPORTANCE OF EXCLUSIVE BREAST FEEDING ''
SHAHEEN SHAIKH
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Manage Promotions in Odoo 18 Sales
Celine George
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
Dimensions of Societal Planning in Commonism
StefanMz
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
Ad

Using Docker Developing and Deploying Software with Containers 1st Edition Adrian Mouat

  • 1. Using Docker Developing and Deploying Software with Containers 1st Edition Adrian Mouat download https://textbookfull.com/product/using-docker-developing-and- deploying-software-with-containers-1st-edition-adrian-mouat/ Download more ebook from https://textbookfull.com
  • 2. We believe these products will be a great fit for you. Click the link to download now, or visit textbookfull.com to discover even more! Docker containers build and deploy with Kubernetes Flannel Cockpit and Atomic First Printing Edition Henry https://textbookfull.com/product/docker-containers-build-and- deploy-with-kubernetes-flannel-cockpit-and-atomic-first-printing- edition-henry/ The DevOps 2 1 Toolkit Docker Swarm Building testing deploying and monitoring services inside Docker Swarm clusters 1st Edition Viktor Farcic https://textbookfull.com/product/the-devops-2-1-toolkit-docker- swarm-building-testing-deploying-and-monitoring-services-inside- docker-swarm-clusters-1st-edition-viktor-farcic/ The SQL Server Dba■s Guide to Docker Containers: Agile Deployment Without Infrastructure Lock-in 1st Edition Edwin M Sarmiento https://textbookfull.com/product/the-sql-server-dba%c2%92s-guide- to-docker-containers-agile-deployment-without-infrastructure- lock-in-1st-edition-edwin-m-sarmiento/ Modern Full-Stack Development: Using TypeScript, React, Node.js, Webpack, and Docker Zammetti https://textbookfull.com/product/modern-full-stack-development- using-typescript-react-node-js-webpack-and-docker-zammetti/
  • 3. Developing Web Components with TypeScript: Native Web Development Using Thin Libraries 1st Edition Jorg Krause [Krause https://textbookfull.com/product/developing-web-components-with- typescript-native-web-development-using-thin-libraries-1st- edition-jorg-krause-krause/ Deploy Containers on AWS With EC2, ECS, and EKS Shimon Ifrah https://textbookfull.com/product/deploy-containers-on-aws-with- ec2-ecs-and-eks-shimon-ifrah/ Developing Web Components with TypeScript Native Web Development Using Thin Libraries 1st Edition Jorg Krause Krause Jörg https://textbookfull.com/product/developing-web-components-with- typescript-native-web-development-using-thin-libraries-1st- edition-jorg-krause-krause-jorg/ Creating and Using Virtual Prototyping Software Principles and Practices SEI Series in Software Engineering 1st Edition Post https://textbookfull.com/product/creating-and-using-virtual- prototyping-software-principles-and-practices-sei-series-in- software-engineering-1st-edition-post/ Developing bots with Microsoft Bots Framework: create intelligent bots using MS Bot Framework and Azure Cognitive Services 1st Edition Srikanth Machiraju https://textbookfull.com/product/developing-bots-with-microsoft- bots-framework-create-intelligent-bots-using-ms-bot-framework- and-azure-cognitive-services-1st-edition-srikanth-machiraju/
  • 4. Adrian Mouat Using Docker DEVELOPING AND DEPLOYING SOFTWARE WITH CONTAINERS www.it-ebooks.info
  • 7. 978-1-491-91576-9 [LSI] Using Docker by Adrian Mouat Copyright © 2016 Adrian Mouat. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or [email protected]. Editor: Brian Anderson Production Editor: Melanie Yarbrough Copyeditor: Christina Edwards Proofreader: Amanda Kersey Indexer: WordCo Indexing Services Interior Designer: David Futato Cover Designer: Randy Comer Illustrator: Rebecca Demarest December 2015: First Edition Revision History for the First Edition 2015-12-07: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491915769 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Using Docker, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. www.it-ebooks.info
  • 8. To those who try, whether they fail or succeed. www.it-ebooks.info
  • 10. Table of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Part I. Background and Basics 1. The What and Why of Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Containers Versus VMs 4 Docker and Containers 6 Docker: A History 8 Plugins and Plumbing 10 64-Bit Linux 10 2. Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Installing Docker on Linux 13 Run SELinux in Permissive Mode 14 Running Without sudo 15 Installing Docker on Mac OS or Windows 15 A Quick Check 17 3. First Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Running Your First Image 19 The Basic Commands 20 Building Images from Dockerfiles 24 Working with Registries 27 Private Repositories 29 Using the Redis Official Image 30 Conclusion 33 v www.it-ebooks.info
  • 11. 4. Docker Fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 The Docker Architecture 35 Underlying Technologies 36 Surrounding Technologies 37 Docker Hosting 39 How Images Get Built 39 The Build Context 39 Image Layers 41 Caching 43 Base Images 44 Dockerfile Instructions 46 Connecting Containers to the World 49 Linking Containers 49 Managing Data with Volumes and Data Containers 51 Sharing Data 53 Data Containers 54 Common Docker Commands 55 The run Command 56 Managing Containers 59 Docker Info 62 Container Info 62 Dealing with Images 63 Using the Registry 66 Conclusion 67 Part II. The Software Lifecycle with Docker 5. Using Docker in Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Say “Hello World!” 71 Automating with Compose 81 The Compose Workflow 83 Conclusion 84 6. Creating a Simple Web App. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Creating a Basic Web Page 86 Taking Advantage of Existing Images 88 Add Some Caching 93 Microservices 96 Conclusion 97 vi | Table of Contents www.it-ebooks.info
  • 12. 7. Image Distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Image and Repository Naming 99 The Docker Hub 100 Automated Builds 102 Private Distribution 104 Running Your Own Registry 104 Commerical Registries 111 Reducing Image Size 111 Image Provenance 113 Conclusion 114 8. Continuous Integration and Testing with Docker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Adding Unit Tests to Identidock 116 Creating a Jenkins Container 121 Triggering Builds 128 Pushing the Image 129 Responsible Tagging 129 Staging and Production 131 Image Sprawl 131 Using Docker to Provision Jenkins Slaves 132 Backing Up Jenkins 132 Hosted CI Solutions 133 Testing and Microservices 133 Testing in Production 135 Conclusion 135 9. Deploying Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Provisioning Resources with Docker Machine 138 Using a Proxy 141 Execution Options 147 Shell Scripts 148 Using a Process Manager (or systemd to Rule Them All) 150 Using a Configuration Management Tool 153 Host Configuration 157 Choosing an OS 157 Choosing a Storage Driver 157 Specialist Hosting Options 160 Triton 160 Google Container Engine 162 Amazon EC2 Container Service 162 Giant Swarm 165 Persistent Data and Production Containers 167 Table of Contents | vii www.it-ebooks.info
  • 13. Sharing Secrets 167 Saving Secrets in the Image 167 Passing Secrets in Environment Variables 168 Passing Secrets in Volumes 168 Using a Key-Value Store 169 Networking 170 Production Registry 170 Continuous Deployment/Delivery 171 Conclusion 171 10. Logging and Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Logging 174 The Default Docker Logging 174 Aggregating Logs 176 Logging with ELK 176 Docker Logging with syslog 187 Grabbing Logs from File 193 Monitoring and Alerting 194 Monitoring with Docker Tools 194 cAdvisor 196 Cluster Solutions 197 Commercial Monitoring and Logging Solutions 201 Conclusion 201 Part III. Tools and Techniques 11. Networking and Service Discovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Ambassadors 206 Service Discovery 210 etcd 210 SkyDNS 215 Consul 219 Registration 223 Other Solutions 225 Networking Options 226 Bridge 226 Host 227 Container 228 None 228 New Docker Networking 228 Network Types and Plugins 230 viii | Table of Contents www.it-ebooks.info
  • 14. Networking Solutions 230 Overlay 231 Weave 233 Flannel 237 Project Calico 242 Conclusion 246 12. Orchestration, Clustering, and Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Clustering and Orchestration Tools 250 Swarm 251 Fleet 257 Kubernetes 263 Mesos and Marathon 271 Container Management Platforms 282 Rancher 282 Clocker 283 Tutum 285 Conclusion 286 13. Security and Limiting Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Things to Worry About 290 Defense-in-Depth 292 Least Privilege 292 Securing Identidock 293 Segregate Containers by Host 295 Applying Updates 296 Avoid Unsupported Drivers 299 Image Provenance 300 Docker Digests 300 Docker Content Trust 301 Reproducible and Trustworthy Dockerfiles 305 Security Tips 307 Set a User 307 Limit Container Networking 309 Remove Setuid/Setgid Binaries 311 Limit Memory 312 Limit CPU 313 Limit Restarts 314 Limit Filesystems 314 Limit Capabilities 315 Apply Resource Limits (ulimits) 316 Run a Hardened Kernel 318 Table of Contents | ix www.it-ebooks.info
  • 15. Linux Security Modules 318 SELinux 319 AppArmor 322 Auditing 322 Incident Response 323 Future Features 324 Conclusion 324 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 x | Table of Contents www.it-ebooks.info
  • 16. Preface Containers are a lightweight and portable store for an application and its dependencies. Written down by itself, this sounds dry and boring. But the process improvements made possible by containers are anything but; used correctly, containers can be game- changing. So persuasive is the lure of the architectures and workflows made possible by containers that it feels like every major IT company has gone in a year from never having heard of Docker or containers to actively investigating and using them. The rise of Docker has been astonishing. I don’t remember any technology that has had such a fast and profound effect on the IT industry. This book is my attempt to help you understand why containers are so important, what you stand to gain from adopting containerization and, most importantly, how to go about it. Who Should Read This Book This book tries to take a holistic approach to Docker, explaining the reasons for using Docker and showing how to use it and how to integrate it into a software- development workflow. The book covers the entire software lifecycle, from develop‐ ment through to production and maintenance. I have tried to avoid assuming too much of the reader beyond a basic knowledge of Linux and software development in general. The intended readership is primarily software developers, operations engineers, and system administrators (particularly those keen to develop a DevOps approach), but technically informed managers and enthusiasts should also be able to get something out of this book. Why I Wrote This Book I was in the fortunate position to learn about and use Docker while it was still in the early stages of its meteoric rise. When the opportunity to write this book appeared, I leapt at it with both hands. If my scribblings can help some of you to understand and xi www.it-ebooks.info
  • 17. make the most of the containerization movement, I will have achieved more than I have in years of developing software. I truly hope that you enjoy reading this book and that it helps you on the path to using Docker in your organization. Navigating This Book This book is organized roughly as follows: • Part I starts by explaining what containers are and why you should be interested in them, before going into a tutorial chapter showing the basics of Docker. It ends with a large chapter explaining the fundamental concepts and technology in Docker, including an overview of the various Docker commands. • Part II explains how to use Docker in a software-development lifecycle. It starts by showing how to set up a development environment, before building a simple web application that is used as an ongoing example through the rest of Part II. The chapter covers development, testing, and integration, as well as how to deploy containers and how to effectively monitor and log a production system. • Part III goes into advanced details and the tools and techniques needed to run multihost clusters of Docker containers safely and reliably. If you are already using Docker and need to understand how to scale up or solve networking and security issues, this is for you. Conventions Used in This Book The following typographical conventions are used in this book: Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program ele‐ ments such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width bold Shows commands or other text that should be typed literally by the user. Constant width italic Shows text that should be replaced with user-supplied values or by values deter‐ mined by context. xii | Preface www.it-ebooks.info
  • 18. This icon signifies a tip, suggestion, or general note. This icon indicates a warning or caution. Using Code Examples Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/using-docker/. This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a signifi‐ cant amount of example code from this book into your product’s documentation does require permission. We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Using Docker by Adrian Mouat (O’Reilly). Copyright 2016 Adrian Mouat, 978-1-491-91576-9.” If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected]. Safari® Books Online Safari Books Online is an on-demand digital library that deliv‐ ers expert content in both book and video form from the world’s leading authors in technology and business. Technology professionals, software developers, web designers, and business and crea‐ tive professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training. Preface | xiii www.it-ebooks.info
  • 19. Safari Books Online offers a range of plans and pricing for enterprise, government, education, and individuals. Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kauf‐ mann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more information about Safari Books Online, please visit us online. How to Contact Us Please address comments and questions concerning this book to the publisher: O’Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 800-998-9938 (in the United States or Canada) 707-829-0515 (international or local) 707-829-0104 (fax) We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://bit.ly/using-docker. To comment or ask technical questions about this book, send email to bookques‐ [email protected]. For more information about our books, courses, conferences, and news, see our web‐ site at http://www.oreilly.com. Find us on Facebook: http://facebook.com/oreilly Follow us on Twitter: http://twitter.com/oreillymedia Watch us on YouTube: http://www.youtube.com/oreillymedia Acknowledgments I am immensely grateful for all the help, advice, and criticism I received during the writing of this book. If I missed your name in the following list, please accept my apologies; your contribution was appreciated whether I acted on it or not. For their generous feedback, I would like to thank Ally Hume, Tom Sugden, Lukasz Guminski, Tilaye Alemu, Sebastien Goasguen, Maxim Belooussov, Michael Boelen, xiv | Preface www.it-ebooks.info
  • 20. Ksenia Burlachenko, Carlos Sanchez, Daniel Bryant, Christoffer Holmstedt, Mike Rathbun, Fabrizio Soppelsa, Yung-Jin Hu, Jouni Miikki, and Dale Bewley. For technical conversations and input on specific technologies in the book, I would like to thank Andrew Kennedy, Peter White, Alex Pollitt, Fintan Ryan, Shaun Cramp‐ ton, Spike Curtis, Alexis Richardson, Ilya Dmitrichenko, Casey Bisson, Thijs Schnitger, Sheng Liang, Timo Derstappen, Puja Abbassi, Alexander Larsson, and Kel‐ sey Hightower. For allowing me to reuse monsterid.js, I would like to thank Kevin Gaudin. For all their help, I would like to thank the O’Reilly staff, in particular my editor Brian Anderson and Meghan Blanchette, for starting the whole process. Diogo Mónica and Mark Coleman—thanks to both of you for answering my last- minute plea for help. A particular shout-out has to go to two companies: Container Solutions and Cloud‐ Soft. Jamie Dobson and Container Solutions kept me busy blogging and speaking at events, and put me in contact with several people who had an impact on this book. CloudSoft graciously allowed me to use their office during the writing of this book and hosted the Edinburgh Docker meetup, both of which were very important to me. For putting up with my obsession and moaning over the book, I would like to thank all my friends and family; you know who you are (and are unlikely to read this any‐ way). Finally, I would like to thank the BBC 6 Music DJs who provided the soundtrack to this book, including Lauren Laverne, Radcliffe and Maconie, Shaun Keaveny, and Iggy Pop. Preface | xv www.it-ebooks.info
  • 22. PART I Background and Basics In the first part of this book, we’ll start by taking look at what containers are and why they are becoming so popular. This is followed by an introduction to Docker and the key concepts you need to understand to make the most of containers. www.it-ebooks.info
  • 24. CHAPTER 1 The What and Why of Containers Containers are fundamentally changing the way we develop, distribute, and run soft‐ ware. Developers can build software locally, knowing that it will run identically regardless of host environment—be it a rack in the IT department, a user’s laptop, or a cluster in the cloud. Operations engineers can concentrate on networking, resour‐ ces, and uptime and spend less time configuring environments and battling system dependencies. The use and uptake of containers is increasing at a phenomenal rate across the industry, from the smallest start ups to large-scale enterprises. Developers and operations engineers should expect to regularly use containers in some fashion within the next few years. Containers are an encapsulation of an application with its dependencies. At first glance, they appear to be just a lightweight form of virtual machines (VMs)—like a VM, a container holds an isolated instance of an operating system (OS), which we can use to run applications. However, containers have several advantages that enable use cases that are difficult or impossible with traditional VMs: • Containers share resources with the host OS, which makes them an order of magnitude more efficient. Containers can be started and stopped in a fraction of a second. Applications running in containers incur little to no overhead com‐ pared to applications running natively on the host OS. • The portability of containers has the potential to eliminate a whole class of bugs caused by subtle changes in the running environment—it could even put an end to the age-old developer refrain of “but it works on my machine!” • The lightweight nature of containers means developers can run dozens of con‐ tainers at the same time, making it possible to emulate a production-ready dis‐ 3 www.it-ebooks.info
  • 25. 1 The diagram depicts a type 2 hypervisor, such as Virtualbox or VMWare Workstation, which runs on top of a host OS. Type 1 hypervisors, such as Xen, are also available where the hypervisor runs directly on top of the bare metal. 2 The kernel is the core component in an OS and is responsible for providing applications with essential system functions related to memory, CPU, and device access. A full OS consists of the kernel plus various system programs, such as init systems, compilers, and window managers. tributed system. Operations engineers can run many more containers on a single host machine than using VMs alone. • Containers also have advantages for end users and developers outside of deploy‐ ing to the cloud. Users can download and run complex applications without needing to spend hours on configuration and installation issues or worrying about the changes required to their system. In turn, the developers of such appli‐ cations can avoid worrying about differences in user environments and the avail‐ ability of dependencies. More importantly, the fundamental goals of VMs and containers are different—the purpose of a VM is to fully emulate a foreign environment, while the purpose of a container is to make applications portable and self-contained. Containers Versus VMs Though containers and VMs seem similar at first, there are some important differ‐ ences, which are easiest to explain using diagrams. Figure 1-1 shows three applications running in separate VMs on a host. The hypervi‐ sor1 is required to create and run VMs, controlling access to the underlying OS and hardware as well as interpreting system calls when necessary. Each VM requires a full copy of the OS, the application being run, and any supporting libraries. In contrast, Figure 1-2 shows how the same three applications could be run in a con‐ tainerized system. Unlike VMs, the host’s kernel2 is shared with the running contain‐ ers. This means that containers are always constrained to running the same kernel as the host. Applications Y and Z use the same libraries and can share this data rather than having redundant copies. The container engine is responsible for starting and stopping containers in a similar way to the hypervisor on a VM. However, processes running inside containers are equivalent to native processes on the host and do not incur the overheads associated with hypervisor execution. Both VMs and containers can be used to isolate applications from other applications running on the same host. VMs have an added degree of isolation from the hypervi‐ sor and are a trusted and battle-hardened technology. Containers are comparatively new, and many organizations are hesitant to completely trust the isolation features of containers before they have a proven track record. For this reason, it is common to 4 | Chapter 1: The What and Why of Containers www.it-ebooks.info
  • 26. find hybrid systems with containers running inside VMs in order to take advantage of both technologies. Figure 1-1. Three VMs running on a single host Figure 1-2. Three containers running on a single host Containers Versus VMs | 5 www.it-ebooks.info
  • 27. 3 OpenVZ never achieved mass adoption, possibly because of the requirement to run a patched kernel. Docker and Containers Containers are an old concept. For decades, UNIX systems have had the chroot com‐ mand that provides a simple form of filesystem isolation. Since 1998, FreeBSD has had the jail utility, which extended chroot sandboxing to processes. Solaris Zones offered a comparatively complete containerization technology around 2001 but was limited to the Solaris OS. Also in 2001, Parrallels Inc, (then SWsoft) released the commercial Virtuozzo container technology for Linux and later open sourced the core technology as OpenVZ in 2005.3 Then Google started the development of CGroups for the Linux kernel and began moving its infrastructure to containers. The Linux Containers (LXC) project started in 2008 and brought together CGroups, ker‐ nel namespaces, and chroot technology (among others) to provide a complete con‐ tainerization solution. Finally, in 2013, Docker brought the final pieces to the containerization puzzle, and the technology began to enter the mainstream. Docker took the existing Linux container technology and wrapped and extended it in various ways—primarily through portable images and a user-friendly interface—to create a complete solution for the creation and distribution of containers. The Docker platform has two distinct components: the Docker Engine, which is responsible for creating and running containers; and the Docker Hub, a cloud service for distributing containers. The Docker Engine provides a fast and convenient interface for running containers. Before this, running a container using a technology such as LXC required significant specialist knowledge and manual work. The Docker Hub provides an enormous number of public container images for download, allowing users to quickly get started and avoid duplicating work already done by others. Further tooling developed by Docker includes Swarm, a clustering manager; Kitematic, a GUI for working with containers; and Machine, a command-line utility for provisioning Docker hosts. By open sourcing the Docker Engine, Docker was able to grow a large community around Docker and take advantage of public help with bug fixes and enhancements. The rapid rise of Docker meant that it effectively became a de facto standard, which led to industry pressure to move to develop independent formal standards for the container runtime and format. In 2015, this culminated in the establishment of the Open Container Initiative, a “governance structure” sponsored by Docker, Microsoft, CoreOS, and many other important organizations, whose mission is to develop such a standard. Docker’s container format and runtime forms the basis of the effort. The uptake of containers has largely been driven by developers, who for the first time were given the tools to use containers effectively. The fast start-up time of Docker 6 | Chapter 1: The What and Why of Containers www.it-ebooks.info
  • 28. 4 This originally stood for Linux, Apache, MySQL, and PHP—common components in a web application. containers is essential to developers who crave quick and iterative development cycles where they can promptly see the results of code changes. The portability and isolation guarantees of containers ease collaboration with other developers and operations; developers can be sure their code will work across environments, and operations can focus on hosting and orchestrating containers rather than worrying about the code running inside them. The changes brought about by Docker are significantly changing the way we develop software. Without Docker, containers would have remained in the shadows of IT for a long time to come. The Shipping Metaphor The Docker philosophy is often explained in terms of a shipping-container metaphor, which presumably explains the Docker name. The story normally goes something like this: When goods are transported, they have to pass through a variety of different means, possibly including trucks, forklifts, cranes, trains, and ships. These means have to be able to handle a wide variety of goods of different sizes and with different require‐ ments (e.g., sacks of coffee, drums of hazardous chemicals, boxes of electronic goods, fleets of luxury cars, and racks of refrigerated lamb). Historically, this was a cumber‐ some and costly process, requiring manual labor, such as dock workers, to load and unload items by hand at each transit point (Figure 1-3). The transport industry was revolutionized by the introduction of the intermodal con‐ tainer. These containers come in standard sizes and are designed to be moved between modes of transport with a minimum of manual labor. All transport machi‐ nery is designed to handle these containers, from the forklifts and cranes to the trucks, trains, and ships. Refrigerated and insulated containers are available for trans‐ porting temperature sensitive goods, such as food and pharmaceuticals. The benefits of standardization also extend to other supporting systems, such as the labeling and sealing of containers. This means the transport industry can let the producers of goods worry about the contents of the containers so that it can focus on the move‐ ment and storage of the containers themselves. The goal of Docker is to bring the benefits of container standardization to IT. In recent years, software systems have exploded in terms of diversity. Gone are the days of a LAMP4 stack running on a single machine. A typical modern system may include Javascript frameworks, NoSQL databases, message queues, REST APIs, and backends all written in a variety of programming languages. This stack has to run partly or completely on top of a variety of hardware—from the developer’s laptop and the in- house testing cluster to the production cloud provider. Each of these environments is Docker and Containers | 7 www.it-ebooks.info
  • 29. different, running different operating systems with different versions of libraries on different hardware. In short, we have a similar issue to the one seen by the transport industry—we have to continually invest substantial manual effort to move code between environments. Much as the intermodal containers simplified the transporta‐ tion of goods, Docker containers simplify the transportation of software applications. Developers can concentrate on building the application and shipping it through test‐ ing and production without worrying about differences in environment and depen‐ dencies. Operations can focus on the core issues of running containers, such as allocating resources, starting and stopping containers, and migrating them between servers. Figure 1-3. Dockers working in Bristol, England, in 1940 (by Ministry of Information Photo Division Photographer) Docker: A History In 2008, Solomon Hykes founded dotCloud to build a language-agnostic Plaftform- as-a-Service (PaaS) offering. The language-agnostic aspect was the unique selling point for dotCloud—existing PaaSs were tied to particular sets of languages (e.g., 8 | Chapter 1: The What and Why of Containers www.it-ebooks.info
  • 30. Heroku supported Ruby, and Google App Engine supported Java and Python). In 2010, dotCloud took part in Y Combinator accelerator program, where it was were exposed to new partners and began to attract serious investment. The major turning point came in March 2013, when dotCloud open sourced Docker, the core building block of dotCloud. While some companies may have been scared that they were giv‐ ing away their magic beans, dotCloud recognized that Docker would benefit enor‐ mously from becoming a community-driven project. Early versions of Docker were little more than a wrapper around LXC paired with a union filesystem, but the uptake and speed of development was shockingly fast. Within six months, it had more than 6,700 stars on GitHub and 175 nonemployee contributors. This led dotCloud to change its name to Docker, Inc. and to refocus its business model. Docker 1.0 was announced in June 2014, just 15 months after the 0.1 release. Docker 1.0 represented a major jump in stability and reliability—it was now declared “production ready,” although it had already seen production use in several companies, including Spotify and Baidu. At the same time, Docker started moving toward being a complete platform rather than just a container engine, with the launch of the Docker Hub, a public repository for containers. Other companies were quick to see the potential of Docker. Red Hat became a major partner in September 2013 and started using Docker to power its OpenShift cloud offering. Google, Amazon, and DigitalOcean were quick to offer Docker support on their clouds, and several startups began specializing in Docker hosting, such as Stack‐ Dock. In October 2014, Microsoft announced that future versions of Windows Server would support Docker, representing a huge shift in positioning for a company tradi‐ tionally associated with bloated enterprise software. DockerConEU in December 2014 saw the announcement of Docker Swarm, a clus‐ tering manager for Docker and Docker Machine, a CLI tool for provisioning Docker hosts. This was a clear signal of Docker’s intention to provide a complete and integra‐ ted solution for running containers and not allowing themselves to be restricted to only providing the Docker engine. Also that December, CoreOS announced the development of rkt, its own container runtime, and the development of the appc container specification. In June 2015, dur‐ ing DockerCon in San Francisco, Solomon Hykes from Docker and Alex Polvi from CoreOS announced the formation of the Open Container Initiative (then called the Open Container Project) to develop a common standard for container formats and runtimes. Also in June 2015, the FreeBSD project announced that Docker was now supported on FreeBSD, using ZFS and the Linux compatibility layer. In August 2015, Docker and Microsoft released a “tech preview” of the Docker Engine for Windows server. Docker: A History | 9 www.it-ebooks.info
  • 31. 5 Personally, I’ve never liked the phrase; all batteries provide much the same functionality and can only be swapped with batteries of the same size and voltage. I assume the phrase has its origins in Python’s “Batteries Included” philosophy, which it uses to describe the extensive standard library that ships with Python. With the release of Docker 1.8, Docker introduced the content trust feature, which verifies the integrity and publisher of Docker images. Content trust is a critical com‐ ponent for building trusted workflows based on images retrieved from Docker regis‐ tries. Plugins and Plumbing As a company, Docker Inc. has always been quick to recognize it owes a lot of its suc‐ cess to the ecosystem. While Docker Inc. was concentrating on producing a stable, production-ready version of the container engine, other companies such as CoreOS, WeaveWorks, and ClusterHQ were working on related areas, such as orchestrating and networking containers. However, it quickly became clear that Docker Inc., was planning to provide a complete platform out of the box, including networking, stor‐ age, and orchestration capabilities. In order to encourage continued ecosystem growth and ensure users had access to solutions for a wide range of use cases, Docker Inc. announced it would create a modular, extensible framework for Docker where stock components could be swapped out for third-party equivalents or extended with third-party functionality. Docker Inc. called this philosophy “Batteries Included, But Replaceable,” meaning that a complete solution would be provided, but parts could be swapped out.5 At the time of writing, the plugin infrastructure is in its infancy, but is available. There are several plugins already available for networking containers and data man‐ agement. Docker also follows what it calls the “Infrastructure Plumbing Manifesto,” which underlines its commitment to reusing and improving existing infrastructure compo‐ nents where possible and contributing reusable components back to the community when new tools are required. This led to the spinning out of the low-level code for running containers into the runC project, which is overseen by the OCI and can be reused as the basis for other container platforms. 64-Bit Linux At the time of writing, the only stable, production-ready platform for Docker is 64-bit Linux. This means your computer will need to run a 64-bit Linux distribution, and all your containers will also be 64-bit Linux. If you are a Windows or Mac OS user, you can run Docker inside a VM. 10 | Chapter 1: The What and Why of Containers www.it-ebooks.info
  • 32. Support for other native containers on other platforms, including BSD, Solaris, and Windows Server, is in various stages of development. Since Docker does not natively do any virtualization, containers must always match the host kernel—a Windows Server container can only run on a Windows Server host, and a 64-bit Linux con‐ tainer will only run on a 64-bit Linux host. Microservices and Monoliths One of the biggest use cases and strongest drivers behind the uptake of containers are microservices. Microservices are a way of developing and composing software systems such that they are built out of small, independent components that interact with one another over the network. This is in contrast to the traditional monolithic way of developing software, where there is a single large program, typically written in C++ or Java. When it comes to scaling a monolith, commonly the only choice is to scale up, where extra demand is handled by using a larger machine with more RAM and CPU power. Conversely, microservices are designed to scale out, where extra demand is handled by provisioning multiple machines the load can be spread over. In a microservice architecture, it’s possible to only scale the resources required for a particular service, focusing on the bottlenecks in the system. In a monolith, it’s scale everything or noth‐ ing, resulting in wasted resources. In terms of complexity, microservices are a double-edged sword. Each individual microservice should be easy to understand and modify. However, in a system com‐ posed of dozens or hundreds of such services, the overall complexity increases due to the interaction between individual components. The lightweight nature and speed of containers mean they are particularly well suited for running a microservice architecture. Compared to VMs, containers are vastly smaller and quicker to deploy, allowing microservice architectures to use the mini‐ mum of resources and react quickly to changes in demand. For more information on microservices, see Building Microservices by Sam Newman (O’Reilly) and Martin Fowler’s Microservice Resource Guide. 64-Bit Linux | 11 www.it-ebooks.info
  • 33. Other documents randomly have different content
  • 34. when he feels he cannot die, And knows himself no vision to himself, Nor the high God a vision, nor that One Who rose again”; The Ancient Sage, 548—“Thou canst not prove the Nameless, O my son! Nor canst thou prove the world thou movest in. Thou canst not prove that thou art body alone, Nor canst Thou prove that thou art spirit alone, Nor canst thou prove that thou art both in one. Thou canst not prove that thou art immortal, no, Nor yet that thou art mortal. Nay, my son, thou canst not prove that I, who speak with thee, Am not thyself in converse with thyself. For nothing worthy proving can be proven, Nor yet disproven: Wherefore be thou wise, Cleave ever to the sunnier side of doubt, And cling to Faith beyond the forms of Faith.” III. Other Supposed Sources of our Idea of God's Existence. Our proof that the idea of God's existence is a rational intuition will not be complete, until we show that attempts to account in other ways for the origin of the idea are insufficient, and require as their
  • 35. presupposition the very intuition which they would supplant or reduce to a secondary place. We claim that it cannot be derived from any other source than an original cognitive power of the mind. 1. Not from external revelation,—whether communicated (a) through the Scriptures, or (b)through tradition; for, unless man had from another source a previous knowledge of the existence of a God from whom such a revelation might come, the revelation itself could have no authority for him. (a) See Gillespie, Necessary Existence of God, 10; Ebrard, Dogmatik, 1:117; H. B. Smith, Faith and Philosophy, 18—“A revelation takes for granted that he to whom it is made has some knowledge of God, though it may enlarge and purify that knowledge.” We cannot prove God from the authority of the Scriptures, and then also prove the Scriptures from the authority of God. The very idea of Scripture as a revelation presupposes belief in a God who can make it. Newman Smyth, in New Englander, 1878:355— We cannot derive from a sun-dial our knowledge of the existence of a sun. The sun- dial presupposes the sun, and cannot be
  • 36. understood without previous knowledge of the sun. Wuttke, Christian Ethics, 2:103—“The voice of the divine ego does not first come to the consciousness of the individual ego from without; rather does every external revelation presuppose already this inner one; there must echo out from within man something kindred to the outer revelation, in order to its being recognized and accepted as divine.” Fairbairn, Studies in Philos. of Relig. and Hist., 21, 22—“If man is dependent on an outer revelation for his idea of God, then he must have what Schelling happily termed [pg 063] ‘an original atheism of consciousness.’ Religion cannot, in that case, be rooted in the nature of man,—it must be implanted from without.” Schurman, Belief in God, 78—“A primitive revelation of God could only mean that God had endowed man with the capacity of apprehending his divine original. This capacity, like every other, is innate, and like every other, it realizes itself only in the presence of appropriate conditions.”Clarke, Christian Theology, 112—“Revelation cannot demonstrate God's existence, for it must assume it; but it will manifest his existence and character to men, and will serve them as the chief source of
  • 37. certainty concerning him, for it will teach them what they could not know by other means.” (b) Nor does our idea of God come primarily from tradition, for “tradition can perpetuate only what has already been originated” (Patton). If the knowledge thus handed down is the knowledge of a primitive revelation, then the argument just stated applies—that very revelation presupposed in those who first received it, and presupposes in those to whom it is handed down, some knowledge of a Being from whom such a revelation might come. If the knowledge thus handed down is simply knowledge of the results of the reasonings of the race, then the knowledge of God comes originally from reasoning—an explanation which we consider further on. On the traditive theory of religion, see Flint, Theism, 23, 338; Cocker, Christianity and Greek Philosophy, 86-96; Fairbairn, Studies in Philos. of Relig. and Hist., 14, 15; Bowen, Metaph. and Ethics, 453, and in Bib. Sac., Oct. 1876; Pfleiderer, Religionsphilos., 312-322. Similar answers must be returned to many common explanations of man's belief in God: “Primus in orbe deos fecit timor”; Imagination
  • 38. made religion; Priests invented religion; Religion is a matter of imitation and fashion. But we ask again: What caused the fear? Who made the imagination? What made priests possible? What made imitation and fashion natural? To say that man worships, merely because he sees other men worshiping, is as absurd as to say that a horse eats hay because he sees other horses eating it. There must be a hunger in the soul to be satisfied, or external things would never attract man to worship. Priests could never impose upon men so continuously, unless there was in human nature a universal belief in a God who might commission priests as his representatives. Imagination itself requires some basis of reality, and a larger basis as civilization advances. The fact that belief in God's existence gets a wider hold upon the race with each added century, shows that, instead of fear having caused belief in God, the truth is that belief in God has caused fear; indeed, “the fear of Jehovah is the beginning of wisdom” (Ps. 111:10). 2. Not from experience,—whether this mean (a) the sense-perception and reflection of the individual (Locke), (b) the accumulated results of the
  • 39. sensations and associations of past generations of the race (Herbert Spencer), or (c) the actual contact of our sensitive nature with God, the supersensible reality, through the religious feeling (Newman Smyth). The first form of this theory is inconsistent with the fact that the idea of God is not the idea of a sensible or material object, nor a combination of such ideas. Since the spiritual and infinite are direct opposites of the material and finite, no experience of the latter can account for our idea of the former. With Locke (Essay on Hum. Understanding, 2:1:4), experience is the passive reception of ideas by sensation or by reflection. Locke's “tabula rasa” theory mistakes the occasion of our primitive ideas for their cause. To his statement: “Nihil est in intellectu nisi quod ante fuerit in sensu,” Leibnitz replied: “Nisi intellectus ipse.”Consciousness is sometimes called the source of our knowledge of God. But consciousness, as simply an accompanying knowledge of ourselves and our states, is not properly the source of any other knowledge. The German Gottesbewusstsein = not “consciousness of God,” but “knowledge of
  • 40. God”; Bewusstsein here = not a “conknowing,”but a “beknowing”; see Porter, Human Intellect, 86; Cousin, True, Beautiful and Good, 48, 49. Fraser, Locke, 143-147—Sensations are the bricks, and association the mortar, of the mental house. Bowne, Theory of Thought and Knowledge, 47—“Develope language by allowing sounds to associate and evolve meaning for themselves? Yet this is the exact parallel of the philosophy which aims to build intelligence out of sensation....52—One [pg 064]who does not know how to read would look in vain for meaning in a printed page, and in vain would he seek to help his failure by using strong spectacles.”Yet even if the idea of God were a product of experience, we should not be warranted in rejecting it as irrational. See Brooks, Foundations of Zoölogy, 132 —“There is no antagonism between those who attribute knowledge to experience and those who attribute it to our innate reason; between those who attribute the development of the germ to mechanical conditions and those who attribute it to the inherent potency of the germ itself; between those who hold that all nature was latent in the cosmic vapor and those who
  • 41. believe that everything in nature is immediately intended rather than predetermined.” All these may be methods of the immanent God. The second form of the theory is open to the objection that the very first experience of the first man, equally with man's latest experience, presupposes this intuition, as well as the other intuitions, and therefore cannot be the cause of it. Moreover, even though this theory of its origin were correct, it would still be impossible to think of the object of the intuition as not existing, and the intuition would still represent to us the highest measure of certitude at present attainable by man. If the evolution of ideas is toward truth instead of falsehood, it is the part of wisdom to act upon the hypothesis that our primitive belief is veracious. Martineau, Study, 2:26—“Nature is as worthy of trust in her processes, as in her gifts.” Bowne, Examination of Spencer, 163, 164—“Are we to seek truth in the minds of pre-human apes, or in the blind stirrings of some primitive pulp? In that case we can indeed put away all our science, but we must put away the great doctrine of evolution along with it. The
  • 42. experience-philosophy cannot escape this alternative: either the positive deliverances of our mature consciousness must be accepted as they stand, or all truth must be declared impossible.” See also Harris, Philos. Basis Theism, 137-142. Charles Darwin, in a letter written a year before his death, referring to his doubts as to the existence of God, asks: “Can we trust to the convictions of a monkey's mind?” We may reply: “Can we trust the conclusions of one who was once a baby?” Bowne, Ethics, 3—“The genesis and emergence of an idea are one thing; its validity is quite another. The logical value of chemistry cannot be decided by reciting its beginnings in alchemy; and the logical value of astronomy is independent of the fact that it began in astrology.... 11—Even if man came from the ape, we need not tremble for the validity of the multiplication-table or of the Golden Rule. If we have moral insight, it is no matter how we got it; and if we have no such insight, there is no help in any psychological theory.... 159—We must not appeal to savages and babies to find what is natural to the human mind.... In the case of anything that is under the law of development
  • 43. we can find its true nature, not by going back to its crude beginnings, but by studying the finished outcome.” Dawson, Mod. Ideas of Evolution, 13—“If the idea of God be the phantom of an apelike brain, can we trust to reason or conscience in any other matter? May not science and philosophy themselves be similar phantasies, evolved by mere chance and unreason?” Even though man came from the ape, there is no explaining his ideas by the ideas of the ape: “A man 's a man for a' that.” We must judge beginnings by endings, not endings by beginnings. It matters not how the development of the eye took place nor how imperfect was the first sense of sight, if the eye now gives us correct information of external objects. So it matters not how the intuitions of right and of God originated, if they now give us knowledge of objective truth. We must take for granted that evolution of ideas is not from sense to nonsense. G. H. Lewes, Study of Psychology, 122—“We can understand the amœba and the polyp only by a light reflected from the study of man.” Seth, Ethical Principles, 429—“The oak explains the acorn even more truly than the acorn explains the oak.” Sidgwick: “No one appeals from the artist's
  • 44. sense of beauty to the child's. Higher mathematics are no less true, because they can be apprehended only by trained intellect. No strange importance attaches to what was first felt or thought.” Robert Browning, Paracelsus: “Man, once descried, imprints forever His presence on all lifeless things.... A supplementary reflux of light Illustrates all the inferior grades, explains Each back step in the circle.” Man, with his higher ideas, shows the meaning and content of all that led up to him. He is the last round of the ascending ladder, and from this highest product and from his ideas we may infer what his Maker is. [pg 065] Bixby, Crisis in Morals, 162, 245—“Evolution simply gave man such height that he could at last discern the stars of moral truth which had previously been below the horizon. This is very different from saying that moral truths are merely transmitted products of the experiences of utility.... The germ of the idea of God, as of the idea of right, must have been in man just so soon as he became man,—the brute's gaining it turned him into man. Reason is not simply a register of physical phenomena and of experiences of pleasure and pain: it is creative
  • 45. also. It discerns the oneness of things and the supremacy of God.” Sir Charles Lyell: “The presumption is enormous that all our faculties, though liable to err, are true in the main and point to real objects. The religious faculty in man is one of the strongest of all. It existed in the earliest ages, and instead of wearing out before advancing civilization, it grows stronger and stronger, and is to-day more developed among the highest races than it ever was before. I think we may safely trust that it points to a great truth.” Fisher, Nat. and Meth. of Rev., 137, quotes Augustine: “Securus judicat orbis terrarum,”and tells us that the intellect is assumed to be an organ of knowledge, however the intellect may have been evolved. But if the intellect is worthy of trust, so is the moral nature. George A. Gordon, The Christ of To-day, 103—“To Herbert Spencer, human history is but an incident of natural history, and force is supreme. To Christianity nature is only the beginning, and man the consummation. Which gives the higher revelation of the life of the tree—the seed, or the fruit?” The third form of the theory seems to make God a sensuous object, to reverse the proper order of
  • 46. knowing and feeling, to ignore the fact that in all feeling there is at least some knowledge of an object, and to forget that the validity of this very feeling can be maintained only by previously assuming the existence of a rational Deity. Newman Smyth tells us that feeling comes first; the idea is secondary. Intuitive ideas are not denied, but they are declared to be direct reflections, in thought, of the feelings. They are the mind's immediate perception of what it feels to exist. Direct knowledge of God by intuition is considered to be idealistic, reaching God by inference is regarded as rationalistic, in its tendency. See Smyth, The Religious Feeling; reviewed by Harris, in New Englander, Jan., 1878: reply by Smyth, in New Englander, May, 1878. We grant that, even in the case of unregenerate men, great peril, great joy, great sin often turn the rational intuition of God into a presentative intuition. The presentative intuition, however, cannot be affirmed to be common to all men. It does not furnish the foundation or explanation of a universal capacity for religion. Without the rational
  • 47. intuition, the presentative would not be possible, since it is only the rational that enables man to receive and to interpret the presentative. The very trust that we put in feeling presupposes an intuitive belief in a true and good God. Tennyson said in 1869: “Yes, it is true that there are moments when the flesh is nothing to me; when I know and feel the flesh to be the vision; God and the spiritual is the real; it belongs to me more than the hand and the foot. You may tell me that my hand and my foot are only imaginary symbols of my existence,—I could believe you; but you never, never can convince me that the I is not an eternal Reality, and that the spiritual is not the real and true part of me.” 3. Not from reasoning,—because (a) The actual rise of this knowledge in the great majority of minds is not the result of any conscious process of reasoning. On the other hand, upon occurrence of the proper conditions, it flashes upon the soul with the quickness and force of an immediate revelation.
  • 48. (b) The strength of men's faith in God's existence is not proportioned to the strength of the reasoning faculty. On the other hand, men of greatest logical power are often inveterate sceptics, while men of unwavering faith are found among those who cannot even understand the arguments for God's existence. (c) There is more in this knowledge than reasoning could ever have [pg 066] furnished. Men do not limit their belief in God to the just conclusions of argument. The arguments for the divine existence, valuable as they are for purposes to be shown hereafter, are not sufficient by themselves to warrant our conviction that there exists an infinite and absolute Being. It will appear upon examination that the a priori argument is capable of proving only an abstract and ideal proposition, but can never conduct us to the existence of a real Being. It will appear that the a posteriori arguments, from merely finite existence, can never demonstrate the existence of the infinite. In the words of Sir Wm. Hamilton (Discussions, 23)—“A demonstration of the absolute from the relative is logically absurd, as in such a syllogism we must collect in the conclusion what is not distributed in the premises”—in short, from finite premises we cannot draw an infinite conclusion.
  • 49. Whately, Logic, 290-292; Jevons, Lessons in Logic, 81; Thompson, Outline Laws of Thought, sections 82-92; Calderwood, Philos. of Infinite, 60-69, and Moral Philosophy, 238; Turnbull, in Bap. Quarterly, July, 1872:271; Van Oosterzee, Dogmatics, 239; Dove, Logic of Christian Faith, 21. Sir Wm. Hamilton: “Departing from the particular, we admit that we cannot, in our highest generalizations, rise above the finite.” Dr. E. G. Robinson: “The human mind turns out larger grists than are ever put in at the hopper.”There is more in the idea of God than could have come out so small a knot-hole as human reasoning. A single word, a chance remark, or an attitude of prayer, suggests the idea to a child. Helen Keller told Phillips Brooks that she had always known that there was a God, but that she had not known his name. Ladd, Philosophy of Mind, 119—“It is a foolish assumption that nothing can be certainly known unless it be reached as the result of a conscious syllogistic process, or that the more complicated and subtle this process is, the more sure is the conclusion. Inferential knowledge is always dependent upon the superior certainty of immediate knowledge.”George M. Duncan, in Memorial of
  • 50. Noah Porter, 246—“All deduction rests either on the previous process of induction, or on the intuitions of time and space which involve the Infinite and Absolute.” (d) Neither do men arrive at the knowledge of God's existence by inference; for inference is condensed syllogism, and, as a form of reasoning, is equally open to the objection just mentioned. We have seen, moreover, that all logical processes are based upon the assumption of God's existence. Evidently that which is presupposed in all reasoning cannot itself be proved by reasoning. By inference, we of course mean mediate inference, for in immediate inference (e. g., “All good rulers are just; therefore no unjust rulers are good”) there is no reasoning, and no progress in thought. Mediate inference is reasoning—is condensed syllogism; and what is so condensed may be expanded into regular logical form. Deductive inference: “A negro is a fellow-creature; therefore he who strikes a negro strikes a fellow-creature.”Inductive inference: “The first finger is before the second; therefore it is before the third.” On
  • 51. inference, see Martineau, Essays, 1:105-108; Porter, Human Intellect, 444-448; Jevons, Principles of Science, 1:14, 136-139, 168, 262. Flint, in his Theism, 77, and Herbert, in his Mod. Realism Examined, would reach the knowledge of God's existence by inference. The latter says God is not demonstrable, but his existence is inferred, like the existence of our fellow men. But we reply that in this last case we infer only the finite from the finite, while the difficulty in the case of God is in inferring the infinite from the finite. This very process of reasoning, moreover, presupposes the existence of God as the absolute Reason, in the way already indicated. Substantially the same error is committed by H. B. Smith, Introd. to Chr. Theol., 84-133, and by Diman, Theistic Argument, 316, 364, both of whom grant an intuitive element, but use it only to eke out the insufficiency of reasoning. They consider that the intuition gives us only an abstract idea, which contains in itself no voucher for the existence [pg 067]of an actual being corresponding to the idea, and that we reach real being only by inference from the facts of our own spiritual natures and of the
  • 52. outward world. But we reply, in the words of McCosh, that “the intuitions are primarily directed to individual objects.” We know, not the infinite in the abstract, but infinite space and time, and the infinite God. See McCosh, Intuitions, 26, 199, who, however, holds the view here combated. Schurman, Belief in God, 43—“I am unable to assign to our belief in God a higher certainty than that possessed by the working hypotheses of science.... 57—The nearest approach made by science to our hypothesis of the existence of God lies in the assertion of the universality of law ... based on the conviction of the unity and systematic connection of all reality.... 64—This unity can be found only in self-conscious spirit.” The fault of this reasoning is that it gives us nothing necessary or absolute. Instances of working hypotheses are the nebular hypothesis in astronomy, the law of gravitation, the atomic theory in chemistry, the principle of evolution. No one of these is logically independent or prior. Each of them is provisional, and each may be superseded by new discovery. Not so with the idea of God. This idea is presupposed by all the others, as the condition of every mental process and the guarantee of its validity.
  • 53. IV. Contents of this Intuition. 1. In this fundamental knowledge that God is, it is necessarily implied that to some extent men know intuitively what God is, namely, (a) a Reason in which their mental processes are grounded; (b) a Power above them upon which they are dependent; (c) a Perfection which imposes law upon their moral natures; (d) a Personality which they may recognize in prayer and worship. In maintaining that we have a rational intuition of God, we by no means imply that a presentative intuition of God is impossible. Such a presentative intuition was perhaps characteristic of unfallen man; it does belong at times to the Christian; it will be the blessing of heaven (Mat. 5:8—“the pure in heart ... shall see God”; Rev. 22:4—“they shall see his face”). Men's experiences of face-to-face apprehension of God, in danger and guilt, give some reason to believe that a presentative knowledge of God is the normal condition of humanity. But, as this presentative intuition of God is not in our present state universal, we here claim only that all men have a rational intuition of God.
  • 54. It is to be remembered, however, that the loss of love to God has greatly obscured even this rational intuition, so that the revelation of nature and the Scriptures is needed to awaken, confirm and enlarge it, and the special work of the Spirit of Christ to make it the knowledge of friendship and communion. Thus from knowing about God, we come to know God (John 17:3—“This is life eternal, that they should know thee”; 2 Tim. 1:12—“I know him whom I have believed”). Plato said, for substance, that there can be no ὅτι οἶδεν without something of the ἁ οἶδεν. Harris, Philosophical Basis of Theism, 208—“By rational intuition man knows that absolute Being exists; his knowledge of what it is, is progressive with his progressive knowledge of man and of nature.” Hutton, Essays: “A haunting presence besets man behind and before. He cannot evade it. It gives new meanings to his thoughts, new terror to his sins. It becomes intolerable. He is moved to set up some idol, carved out of his own nature, that will take its place—a non-moral God who will not disturb his dream of rest. It is a righteous Life and Will, and not the mere idea of righteousness that stirs men so.” Porter,
  • 55. Hum. Int., 661—“The Absolute is a thinking Agent.” The intuition does not grow in certainty; what grows is the mind's quickness in applying it and power of expressing it. The intuition is not complex; what is complex is the Being intuitively cognized. See Calderwood, Moral Philosophy, 232; Lowndes, Philos. [pg 068]of Primary Beliefs, 108-112; Luthardt, Fund. Truths, 157—Latent faculty of speech is called forth by speech of others; the choked-up well flows again when debris is cleared away. Bowen, in Bib. Sac., 33:740-754; Bowne, Theism, 79. Knowledge of a person is turned into personal knowledge by actual communication or revelation. First, comes the intuitive knowledge of God possessed by all men—the assumption that there exists a Reason, Power, Perfection, Personality, that makes correct thinking and acting possible. Secondly, comes the knowledge of God's being and attributes which nature and Scripture furnish. Thirdly, comes the personal and presentative knowledge derived from actual reconciliation and intercourse with God, through Christ and the Holy Spirit. Stearns, Evidence of Christian Experience, 208 —“Christian experience verifies the claims of
  • 56. doctrine by experiment,—so transforming probable knowledge into real knowledge.” Biedermann, quoted by Pfleiderer, Grundriss, 18 —“God reveals himself to the human spirit, 1. as its infinite Ground, in the reason; 2. as its infinite Norm, in the conscience; 3. as its infinite Strength, in elevation to religious truth, blessedness, and freedom.” Shall I object to this Christian experience, because only comparatively few have it, and I am not among the number? Because I have not seen the moons of Jupiter, shall I doubt the testimony of the astronomer to their existence? Christian experience, like the sight of the moons of Jupiter, is attainable by all. Clarke, Christian Theology, 113—“One who will have full proof of the good God's reality must put it to the experimental test. He must take the good God for real, and receive the confirmation that will follow. When faith reaches out after God, it finds him.... They who have found him will be the sanest and truest of their kind, and their convictions will be among the safest convictions of man.... Those who live in fellowship with the good God will grow in goodness, and will give practical evidence of his existence aside from their oral testimony.”
  • 57. 2. The Scriptures, therefore, do not attempt to prove the existence of God, but, on the other hand, both assume and declare that the knowledge that God is, is universal (Rom. 1:19-21, 28, 32; 2:15). God has inlaid the evidence of this fundamental truth in the very nature of man, so that nowhere is he without a witness. The preacher may confidently follow the example of Scripture by assuming it. But he must also explicitly declare it, as the Scripture does. “For the invisible things of him since the creation of the world are clearly seen” (καθορᾶται—spiritually viewed); the organ given for this purpose is the νοῦς (νοούμενα); but then—and this forms the transition to our next division of the subject—they are “perceived through the things that are made” (τοῖς ποιήμασιν, Rom. 1:20). On Rom. 1:19-21, see Weiss, Bib. Theol. des N. T., 251, note; also commentaries of Meyer, Alford, Tholuck, and Wordsworth; τὸ γνωστὸν τοῦ θεοῦ = not “that which may be known” (Rev. Vers.) but “that which is known” of God; νοούμενα καθορᾶται = are clearly seen in that they are perceived by the reason—νοούμενα expresses the manner of the καθορᾶται (Meyer); compare John 1:9; Acts 17:27; Rom. 1:28; 2:15. On 1 Cor. 15:34, see Calderwood,
  • 58. Philos. of Inf., 466—ἀγνωσίαν Θεοῦ τινὲς ἔχουσι = do not possess the specially exalted knowledge of God which belongs to believers in Christ (cf. 1 Jo. 4:7—“every one that loveth is begotten of God, and knoweth God”). On Eph. 2:12, see Pope, Theology, 1:240—ἄθεοι ἐν τῷ κόσμῳ is opposed to being in Christ, and signifies rather forsaken of God, than denying him or entirely ignorant of him. On Scripture passages, see Schmid, Bib. Theol. des N. T., 486; Hofmann, Schriftbeweis, 1:62. E. G. Robinson: “The first statement of the Bible is, not that there is a God, but that ‘In the beginning God created the heavens and the earth’ (Gen. 1:1). The belief in God never was and never can be the result of logical argument, else the Bible would give us proofs.”Many texts relied upon as proofs of God's existence are simply explications of the idea of God, as for example: Ps. 94:9, 10—“He that planted the ear, shall he not hear? He that formed the eye, shall he not see? He that chastiseth the nations, shall not he correct, even he that teacheth man knowledge?”Plato says that God holds the soul by its roots,—he therefore does not need to demonstrate to the soul the fact of his existence. Martineau, Seat
  • 59. of Authority, 308, says well that Scripture and preaching only interpret what is already in the heart which it addresses: “Flinging a warm breath on the inward oracles hid in invisible ink, it renders [pg 069]them articulate and dazzling as the handwriting on the wall. The divine Seer does not convey to you his revelation, but qualifies you to receive your own. This mutual relation is possible only through the common presence of God in the conscience of mankind.”Shedd, Dogmatic Theology, 1:195-220—“The earth and sky make the same sensible impressions on the organs of a brute that they do upon those of a man; but the brute never discerns the ‘invisible things’ of God, his ‘eternal power and godhood’ (Rom. 1:20).” Our subconscious activity, so far as it is normal, is under the guidance of the immanent Reason. Sensation, before it results in thought, has in it logical elements which are furnished by mind— not ours, but that of the Infinite One. Christ, the Revealer of God, reveals God in every man's mental life, and the Holy Spirit may be the principle of self-consciousness in man as in God. Harris, God the Creator, tells us that “man finds the Reason that is eternal and universal
  • 60. revealing itself in the exercise of his own reason.” Savage, Life after Death, 268—“How do you know that your subliminal consciousness does not tap Omniscience, and get at the facts of the universe?”Savage negatives this suggestion, however, and wrongly favors the spirit-theory. For his own experience, see pages 295-329 of his book. C. M. Barrows, in Proceedings of Soc. for Psychical Research, vol. 12, part 30, pages 34- 36—“There is a subliminal agent. What if this is simply one intelligent Actor, filling the universe with his presence, as the ether fills space; the common Inspirer of all mankind, a skilled Musician, presiding over many pipes and keys, and playing through each what music he will? The subliminal self is a universal fountain of energy, and each man is an outlet of the stream. Each man's personal self is contained in it, and thus each man is made one with every other man. In that deep Force, the last fact behind which analysis cannot go, all psychical and bodily effects find their common origin.” This statement needs to be qualified by the assertion of man's ethical nature and distinct personality; see section of this work on Ethical Monism, in chapter III. But there is truth here
  • 61. like that which Coleridge sought to express in his Æolian Harp: “And what if all of animated Nature Be but organic harps diversely framed, That tremble into thought, as o'er them sweeps, Plastic and vast, one intellectual breeze, At once the soul of each, and God of all?” See F. W. H. Myers, Human Personality. Dorner, System of Theology, 1:75—“The consciousness of God is the true fastness of our self-consciousness.... Since it is only in the God- conscious man that the innermost personality comes to light, in like manner, by means of the interweaving of that consciousness of God and of the world, the world is viewed in God (‘sub specie eternitatis’), and the certainty of the world first obtains its absolute security for the spirit.” Royce, Spirit of Mod. Philosophy, synopsis in N. Y. Nation: “The one indubitable fact is the existence of an infinite self, a Logos or World-mind (345). That it exists is clear, I. Because idealism shows that real things are nothing more nor less than ideas, or ‘possibilities of experience’; but a mere ‘possibility’, as such, is nothing, and a world of ‘possible’ experiences, in so far as it is real, must be a world of actual experience to some self (367). If then there be a real world, it has
  • 62. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! textbookfull.com