Skip to main content

2023 | Buch

Oracle on Docker

Running Oracle Databases in Linux Containers

insite
SUCHEN

Über dieses Buch

Discover the benefits of running Oracle databases in Linux containers. This book approaches containers from the perspective of database administrators, developers, and systems administrators. It explains the differences between containers and virtual machines and describes why containers deliver greater speed, flexibility, and portability, with lower resource requirements. You’ll learn how running Oracle databases in containers complements existing database infrastructure and accelerates development, and you’ll understand the advantages they offer for test and validation environments.

This book teaches you how to begin working with Oracle databases in Docker, covering the steps for preparing and installing software on Windows, Mac, and Linux systems. It describes the steps for deploying Oracle databases, separating data and configurations from database software, and networking and communicating with your containers. It introduces the Docker commands you’ll use for managing containers, including tips and shortcuts to make everyday tasks easier. Databases have unique demands for performance and reliability, and this book addresses those qualities with discussions on protecting, persisting, and distributing data. Other books may overlook these topics and approach containers as disposable commodities in serverless environments or convenient coding platforms. You’ll gain battle-tested insights for customizing and extending your containers to meet different needs.

The opening chapters concentrate on the practical steps of running Oracle databases in Docker. Once you’re comfortable with container terminology and methods, you’ll look deeper at the real power behind containers—preparing and building images, and the templates that form the foundation beneath every container. You’ll begin by modifying publicly available image manifests, or Dockerfiles, following multiple examples that add functionality and capabilities to your databases. You’ll discover methods for using run-time options to create flexible and extensible images that adapt to real-world requirements.

Within the pages, you’ll see how Oracle and Docker empower you to confidently build and deploy systems. It’s written with databases and database users in mind and delivers practical advice based on the author’s real-world, battle-tested experiences deploying and running Oracle databases in containers since 2014. With Oracle databases in containers, database administrators have the ideal platform for evaluating performance, practicing database upgrades and migrations, validating backup and recovery processes, and hardening environments. Developers will find that the marriage of Oracle and Docker simplifies code and application tests. Docker’s unique ability to isolate data artifacts improves reliability and confidence in test and QA processes. If you’re a database administrator, this book will help you join the container revolution sweeping the industry and making IT professionals more productive than ever!

What You Will Learn

Recognize when and why to use containers for an Oracle databaseUnderstand container terminology and architectureCreate and customize Oracle databases in containersBuild and extend images and containers for multiple usesStore and persist data beyond the container ecosystemUse popular database tools with databases in containersExplore container networking and connect multiple container databasesManage, monitor, and secure containersWrite Dockerfiles to support custom requirementsPackage and deploy data artifacts that accelerate development, test, and QA activities

Who This Book Is For

Database administrators, developers, and systems administrators who want to be more productive by running Oracle databases in Linux containers

Inhaltsverzeichnis

Frontmatter

Introduction to Containers

Frontmatter
Chapter 1. Introducing Docker and Oracle
Abstract
Over the past decade, we've witnessed a fundamental shift in how infrastructure is built, deployed, and run. The rise of reliability engineering is a response to systems' increasing complexity and scale. Without its tools and methods, managing and monitoring the environments of hundreds or thousands of hosts and services is an unimaginable, impossible task.
Sean Scott
Chapter 2. Understanding the Container Landscape
Abstract
Containers have their own language, and those new to Docker should understand some basic concepts and terminology before jumping in. This chapter introduces the vocabulary needed to navigate the terrain and a high-level view of how containers work. Let's begin by looking at containers in the context of another similar solution that readers may already be familiar with: virtual machines.
Sean Scott
Chapter 3. Container Foundations
Abstract
In the previous chapter, I covered some Docker terms and concepts. This chapter builds on that with more practical, hands-on examples that will help you understand Docker firsthand, how it works, and why it's grown so popular.
Sean Scott
Chapter 4. Oracle Database Quick Start
Abstract
Whenever I give webinars and presentations about running Oracle on Docker, the top request from attendees is a set of step-by-step instructions to get a database up and running in a container. This chapter is a stand-alone collection of recipes for building images and running database containers.
Sean Scott
Chapter 5. Differences in Database Containers
Abstract
I’m old enough to remember the days when Oracle database administrators managed rollback segments by hand. When Oracle introduced automatic undo retention, people (myself included) balked at the idea, confident that it couldn’t manage rollback appropriately. Years later, I can’t imagine a world without that feature!
Sean Scott
Chapter 6. Customize Container Environments
Abstract
Running containers is comparable to calling a sophisticated shell script. Containers and shell scripts both perform a scoped set of tasks. Scripts can be explicit, with hard-coded values, but adding some flexibility makes them more portable and valuable. That might mean deriving specific values from the environment or interpreting parameters passed to the script at runtime. Take an RMAN backup script as an example. Hard-coding the database name prevents its use on other databases. Pass the database name as a variable, and the same script works across an enterprise. Adding additional options for the backup destination, degree of parallelism, and incremental level makes the script much more flexible and valuable over various implementations.
Sean Scott
Chapter 7. Persistence
Abstract
As I began looking for information on running Oracle in containers back in 2014, the consensus among Oracle experts wasn't very promising. Most database administrators dismissed Docker as the latest technology-de-jour among developers and not something capable of handling the demands of a database. They cited dire warnings about instability, poor performance, and data loss. Peers shared horror stories of various disasters rooted in the immaturity or fragility of Docker.
Sean Scott
Chapter 8. Basic Networking
Abstract
In the early days of Unix, compute resources were expensive. Getting the most from these costly systems meant finding ways to support many simultaneous connections. Users from different companies and those working with sensitive information needed assurance their processes and data were safe. This was a driver behind the Unix Time Sharing System, or UTS, and provides session isolation and security, the foundation of modern container implementations.
Sean Scott
Chapter 9. Container Networks
Abstract
I have a confession: networking intimidates me. I spent years in environments with dedicated network administrators and didn’t make time to learn much beyond the basics. It wasn’t until I joined an operations team that I recognized the void in my skills. From what I’ve heard from other database administrators, I’m not alone.
Sean Scott
Chapter 10. Container Creation Quick Reference
Abstract
The first part of this book covered the essential elements of running Oracle databases in Linux containers and emphasized the importance of the docker run command. Anticipating how containers will create their databases, store data, and interact over the network prevents frustration and saves time revising or rebuilding containers later. The preceding chapters addressed these concepts individually, explaining the whys behind each recommendation.
Sean Scott

Building and Customizing Images

Frontmatter
Chapter 11. Customizing Images
Abstract
Something I love about working with Oracle (and databases in general) is the variety. Each day brings something new, and problems often have multiple solutions. Every shop has its way of doing things, and solutions vary from customer to customer based on industry practices, security, and conventions.
Sean Scott
Chapter 12. Dockerfile Syntax
Abstract
One of my favorite activities is cooking, and like any creative endeavor, the best results come when you understand how to use the tools of the craft. It helps to know the rules, which are ironclad (don’t add water to hot oil) and which have flexibility (how much garlic is “too much!”). Others may enjoy the result, but only the chef appreciates the process!
Sean Scott
Chapter 13. Oracle Dockerfile Recipes
Abstract
When I was 13 years old, I saw a movie called Breaking Away, a coming-of-age story about four friends trying to find their place in the world after high school. The main character is a young man who’s so enamored with bike racing that he pretends to be an Italian cyclist. The following day, by chance, I attended a local bike race. That one-two punch was all it took, and that same afternoon I headed to the local bike shop and announced to anyone who’d listen that I was going to be a bike racer! I was a wide-eyed, impressionable teenager and soaked up advice and opinions from local cycling club members, regulars at bike shops, and articles and photos in magazines. One shop in town had a beautiful Italian Colnago. It was black, with gold accents and gold-plated Campagnolo components. It was the epitome of Italian cycling equipment, displayed on the wall behind the register like a piece of art!
Sean Scott
Chapter 14. Building Images
Abstract
There are certain mysteries in life I don’t need (or even want) to understand. Avoiding the knowledge preserves a bit of wonder for the world around me. Sewing machines are one of those things. I can sew by hand, albeit without much talent, but I’ve never figured out how a machine can duplicate that effort. Even with easy access to the Internet, where I could surely find a YouTube video that reveals the entire process in slow motion with stitch-by-stitch expert narration, I’ve resisted learning the underlying principles of sewing machines. How a machine pokes a needle partway through the fabric and then secures each stitch from below is beyond me. I know better, but the best explanation I can imagine involves tiny gremlins that live inside the machine, furiously looping bobbin thread through each stitch. I’m content not knowing—it nourishes a fascination and appreciation of everyday things and reminds me there are wonderfully intelligent and inventive people all around! Or that magic truly exists!
Sean Scott
Chapter 15. Debugging and Troubleshooting
Abstract
“New” and “different” are often intimidating and scary. We’re forced to learn or invent new approaches to familiar or comfortable tasks and perhaps even alter our perceptions and understanding. Tried and true is stable, even secure.
Sean Scott
Chapter 16. Docker Hub and Image Repositories
Abstract
Docker is an Infrastructure as Code tool, or IaC. Dockerfiles are the code, a set of instructions that direct Docker through the steps of creating (or recreating) images. Since Docker is platform agnostic, the same Dockerfile generates identical images on Windows, Mac, and Linux, on private machines, or in the cloud!
Sean Scott
Chapter 17. Conclusion
Abstract
In the first part of this book, you discovered how containers work and how to run an Oracle database in Docker. You learned methods for persisting vital database content—the datafiles and configuration—outside the confines of the container. You’re also fluent in container networking concepts and can connect client applications running on a host, like SQL Developer, to databases in containers. You can also leverage container networks to communicate among databases running containers.
Sean Scott

Appendixes

Frontmatter
Appendix A. Installing Docker Desktop
Abstract
Docker Desktop is available as a free download from www.docker.com. Linux users can install Docker Desktop or Docker Engine, a native environment for running Docker containers.
Sean Scott
Appendix B. Aliases and Functions
Abstract
Aliases and functions simplify and accelerate command-line tasks. By adding them to your shell login profile, they're loaded into your environment every time you log in. The following are some I've adopted over the years to make working with Docker faster and easier.
Sean Scott
Backmatter
Metadaten
Titel
Oracle on Docker
verfasst von
Sean Scott
Copyright-Jahr
2023
Verlag
Apress
Electronic ISBN
978-1-4842-9033-0
Print ISBN
978-1-4842-9032-3
DOI
https://doi.org/10.1007/978-1-4842-9033-0