Running Oracle Database Container on AWS Graviton

Wayne Toh
2 min readMar 20, 2024

--

Oracle provides a repository that contains Dockerfiles and samples to build Docker images for Oracle commercial products and Oracle sponsored open source projects.

Oracle Database 19c Enterprise Edition, the current long-term support release of Oracle Database, is now certified and available on the popular Arm architecture for both cloud and on-premises deployments. Arm servers are energy-efficient without compromising performance, and thus they enable you to run Oracle Database 19c workloads with improved price-performance.

Note: Oracle licensing fees might differ for different processors and arenot factored in this article

AWS Graviton is a family of processors designed to deliver the best price performance for your cloud workloads running in Amazon Elastic Compute Cloud (Amazon EC2).

In this blog we shall create an Arm Docker image of Oracle Database 19c Enterprise Edition natively on a Graviton EC2 server.

Note: It is possible to create a multi-architecture Docker image such that a single image can run on both x86 and Arm64. But we shall not discuss it here.

First provision a Graviton EC2 server. I have chosen a c7g.xlarge EC2 instance type which is based on Graviton3. Also set the EBS size to 50 GB as the installation file and Docker images are a few GB in size.

Install and start Docker

sudo yum install -y Docker
sudo systemctl start Docker

Clone the repository

git clone https://github.com/oracle/docker-images

Download the Linux installation ZIP file LINUX.ARM64_1919000_db_home.zip for Oracle Database 19c from the official Oracle download page. Move the installation file into the directory docker-images/OracleDatabase/SingleInstance/dockerfiles/19.3.0.

The Oracle binary installation requires adjustments for number of files. Let’s edit the file buildContainerImage.sh and change the line below.

${CONTAINER_RUNTIME}" build --force-rm=true --no-cache=true \

The new line shall look like this

${CONTAINER_RUNTIME}" build --ulimit nofile=65536:65536 --force-rm=true --no-cache=true \

We can now execute the build with the following command

./buildContainerImage.sh -v 19.3.0 -ee

The image can be seen as below

Now that we have an image, we can create a container instance

sudo docker run -it --rm --name oracledb -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=myPassword oracle/database:19.3.0-ee

The instance will take about 10 minutes to create the database. When the database is ready you can now connect your application to the database.

--

--