Oracle on Docker: Running Oracle Databases in Linux Containers 9781484290323, 9781484290330, 1484290321

Discover the benefits of running Oracle databases in Linux containers. This book approaches containers from the perspect

129 36 6MB

English Pages 444 [430]

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Part I: Introduction to Containers
Chapter 1: Introducing Docker and Oracle
Why Docker?
Simplicity
Self-Contained
Speed
Portability
Reliability
Cost
Use Cases
Exchange Data
Modular Software
Orchestration
Other Uses
Objections to Docker
Summary
Chapter 2: Understanding the Container Landscape
Containers vs. Virtual Machines
Dedicated vs. Shared
Performance
Capacity and Capability
Concepts and Terminology
Images
Tags
Portable
Immutable and Stateless
Containers
Stateful
Ephemeral
Resources
Volumes
Networking
Additional Terminology
Runtimes
Dockerfiles
Builds
Summary
Chapter 3: Container Foundations
Docker Command-Line Overview
Run Your First Container
List Images
Run a Container
Explore the Container
Image Registries
Minimalism
Modify the Container
Persistence
Check the Container State
Start the Container
Interactive vs. Detached
Connect to the Container
Verify Persistence
Remove the Container
Images Are Immutable
Start a New Container
Save a New Image
Run the New Image
Union Filesystems
Commit vs. Build
Summary
Chapter 4: Oracle Database Quick Start
Access the Docker Environment
Terminology
Docker Commands
Images and Containers
Build and Run
The Docker Command Line
Obtaining an Image
Pre-built Images
Download an Image
Download a Tag
Running Pre-built Images
Pre-built Image Limitations
Building Images from a Repository
Oracle Docker GitHub Repo
Oracle Database Software
Build an Image
Running a Container
Container Properties
Port Publishing
Volume Mounting
Permissions Issues in Linux and Windows WSL Environments
Environment Variables
Container Name
A Full Run Command
View Container Logs
Access and Use the Container
Access a Container Shell
Run SQL*Plus
Run Scripts
Connect from Host Applications
Manage the Container
Summary
Chapter 5: Differences in Database Containers
Start an Oracle Database Container
Connect to the Container
Navigate the Oracle Database Container
Container Differences
Hostname
cron
Binaries
Oracle Directories
Configuration Files
Volumes
Summary
Chapter 6: Customize Container Environments
The Startup Process
View Environment Values
docker run
Command-Line Option
Values from a File
Values from the Host Environment
Overwriting and Creating Variables
Environment Options in Oracle Images
Summary
Chapter 7: Persistence
Container Storage
Docker Internal Storage
Drawbacks of Union Filesystems
Mount Concepts
Volumes vs. Volumes
Mount Types
Bind Mount
Docker Volumes
tmpfs and Secrets
Volumes vs. Bind Mounts
Mounting Storage
Using -v or --volume
Using --mount
Undefined Volumes
Entrypoint Directories
Manage Space
Prune Volumes
Prune Images
Prune Containers
Prune the System
Which Type of Volume Is Best?
No Volume
Bind Mounts
Container Association and Orphans
Mounting Method
Directory Ownership
Local Volumes
Bind-Mounted Volumes
Directory Creation
Directory Ownership and Permissions
Mounting Method
Summary
Chapter 8: Basic Networking
Port Publishing
Publishing Container Ports
Limits of Container Port Mapping
Automatic Port Publication
Connect to a Database in a Container
Set Up Connections in SQL Developer
EZConnect
Creating tnsnames.ora Configurations
Connect to Containers on Remote Hosts
Setting the Container Hostname
Adding Ports to an Existing Container
Summary
Chapter 9: Container Networks
Container Networks
Docker Network Types
Bridge Networks
Host Networks
Other Network Types
Demonstrating Bridge Networking
Displaying Network Information
List Networks
Inspect a Network
Inspect the Container’s Network Entries
Viewing Virtual Devices on the Container Network
Limitations of Default Bridge Networks
Local Connections Work
Remote Connections Fail
User-Defined Bridge Networks
Create the Network
Attach the Containers
What About DNS?
Host Connections
Problems with Port Mapping
Container DNS Resolution on Hosts
You Don’t Need Port Mapping
Disconnect from the Default Bridge Network
Assign a Network During Container Creation
Summary
Chapter 10: Container Creation Quick Reference
Conventions
Storage
Create Volumes
Predefined Volumes in Oracle Database Containers
Preparing Volumes for Oracle Databases
Networking
Create User-Defined Bridge Networks
Connect/Disconnect Containers to/from Networks
Dedicated DNS
Containers
Basic Container Creation
Naming
Assign a Container Name
Assign a Hostname
Define Environment Variables
Assign Storage
Bind-Mount a Directory with -v
Bind-Mount a Directory with --mount
Attach a Predefined Volume with -v
Attach a Predefined Volume with --mount
Entrypoints
Networking
Map Ports to the Host
Add to a Network
Complete Container Examples
Interact with Containers
Open a Shell
Run SQL*Plus
Run a Script
Connect As Root
Manage Passwords
Docker Deployment Examples
New Environment Setup
Add the Oracle Repository
Networking
Running Containers
Disposable Environments
Persistent Environments
Summary
Part II: Building and Customizing Images
Chapter 11: Customizing Images
Script Modifications
OS Install and Configuration
setupLinuxEnv.sh
Dockerfile
Modify the Default Shell Prompt
Add a login.sql File
Database Installation
installDBBinaries.sh
db_inst.rsp
Database Creation
Add a Non-CDB Option
Start and Run the Database
Summary
Chapter 12: Dockerfile Syntax
The Role of Layers in the Build Process
FROM
Build Stages
Configure Environments: ARG and ENV
Extending Images
Argument and Environment Scope During Builds
Build Dockerfile Templates with Arguments
Assign Multiple Variables
Variables and Secrets
LABEL
USER
COPY
Setting Ownership
Context in the Build Process
Copy from Images and Build Stages
Patching
Database Upgrades
RUN
Running Commands and Scripts
Commands or Scripts?
EXPOSE and VOLUME
WORKDIR
CMD
HEALTHCHECK
Summary
Chapter 13: Oracle Dockerfile Recipes
Multipurpose Image Limitations
Fixed Directory Paths
Contradictions
Extended Multitenancy Options
Create Non-CDB Databases
Create Multiple Pluggable Databases
Use the Setup Entrypoint
Create a Read-Only Database Home
Convert a Database Home to Read-Only
Resolve Configuration Directories
Update Scripts
Run Containers with Read-Only Homes
Scripting Image Customization
Conditional Operations
Appending Values in Dockerfiles
Conditional File Copy
Summary
Chapter 14: Building Images
Build Command Syntax
Context
Select a Dockerfile
No Symbolic Links or Shortcuts Allowed in the Context
Ignore Files
Tagging Images
Add Tags to Images
Tag Images During Builds
Arguments
Housekeeping
Pruning
Cache Management
BuildKit
Progress
Ignore Files
BuildKit Syntax
Summary
Chapter 15: Debugging and Troubleshooting
View and Manipulate Output
Echo Information
Add a Debug Option
View Container Logs
Override Container Startup
Intermediate Containers
Build to a Target
Run Cached Layers
Access Container Files
Summary
Chapter 16: Docker Hub and Image Repositories
Docker Hub
Trusted Content
Untrusted Images
Vulnerability Scanning
Licensing
Docker Hub Accounts
Image Management
Registry Login
Tag an Image
Push an Image
CLI Registry Search
Pulling Images
Oracle Container Registry
Summary
Chapter 17: Conclusion
Part III: Appendixes
Appendix A: Installing Docker Desktop
Install Docker Desktop
Windows 10 and 11
Set Up Windows Subsystem for Linux
Configure and Update Linux
Install Docker Desktop
Configure Docker Desktop
Set WSL Resources
Mac (Intel)
Configure Resources
Mac (Apple Silicon)
Docker Desktop and Docker Engine for Linux
Terminal Environments
Windows
Mac Terminal
Docker Desktop Features
Container Management
Container Terminal
Container Logs and Statistics
Container Statistics
Image Management
Volume Management
Appendix B: Aliases and Functions
Aliases
Report Containers
Extended Container Information
Sorted List of Images
List Dangling Volumes
List Dangling Images
Functions
Start a Container Shell
Inspect Function
Index

Oracle on Docker: Running Oracle Databases in Linux Containers
 9781484290323, 9781484290330, 1484290321

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers