Oracle Database on the Docker Store

You probably know that there’s an official github repository storing Dockerfiles and samples to build Docker images for Oracle products and Open Source projects. Now Oracle takes one more step to support Docker. Oracle Brings Oracle’s Flagship Databases and Developer Tools to the Docker Store (you can read the official announcement). Oracle Linux was already on the Docker Store. Oracle Database Enterprise Edition, Oracle client tools, Oracle Weblogic, Oracle Coherence, Java 8 SE are also released on the Docker Store. Now you don’t need to build the image, you can download and use the image from the Docker Store.

To be able to use them, first you need to login to the Docker Store, select the Docker Image you want and click “get content” button. Then the Docker store will ask you enter your contact information (name, phone, company etc), and you have to accept “the Oracle license agreement”.

When we complete the form, we see the instructions (and a sample environment file) to use it. The environment file sets the required parameters such as database SID, password. So now we’re ready to get the image.

I login to the docker (using command line) and pull the image:

Then, I copied the sample environment file, modified the password, SID and domain, and run the docker image (my environment file name is testere.dat and my image name is testere):

Be careful that the shm-size must be 4g or higher.

One of the good thing is, we do not need to provide Oracle Database installation files for these images. Oracle put the all required files into the repository images. You may need to increase the memory resources of Docker. When I run the above command, I see that container created instantly but infact it requires to unzip the database software and create the database during on the first run. I waited for a while and followed the logs:

It’s done. I examined these logs and see that the scripts had some “ignorable” errors about patching. I also see that the database is a container database and it comes with a pluggable database named “PDB1”.

I connected my test database running on Docker, using my favorite SQL client (Oracle SQL Developer) and checked the status. Everything looks OK.

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.


  1. Sumesh

    When I tried to pull the Oracle Database image, I am getting the below error

    [skb@slc]$ docker pull store/oracle/database-enterprise:
    Pulling repository
    Error: image store/oracle/database-enterprise: not found

    Do you know whether the location has changed for Oracle Database?


    • Gokhan Atil

      Have you accepted the license agreement and logged in to docker before you try to pull the image. As I see, the URL is working.

  2. Sumesh

    I copy pasted the command from the blog, but when I manually typed the ‘docker pull’ command it worked.

    [skbalakr@slc12mlv emga]$ docker pull store/oracle/database-enterprise: Pulling from store/oracle/database-enterprise
    1eb8a4da372d: Pull complete
    f86d07afdaca: Downloading [============================================> ] 73.53 MB/83.33 MB
    39b78f36bb3e: Download complete
    fb6f62c61831: Download complete
    632559a5a84b: Download complete
    9a124bc4d5d2: Download complete


  3. Sumesh

    When running the Database create command, I am getting the below error

    [skl@s3]$ docker run -d –env-file ./db_env_file.dat -p 1521:1521 -p 5500:5500 -it –name skbdockerDB –shm-size=”6g” store/oracle/database-enterprise:
    flag provided but not defined: –shm-size
    See ‘docker run –help’.

    Any idea why I am getting the above error

    • Gokhan Atil

      It might be syntax error. You need to use dash dash (–) instead of long dash (Microsoft Word style).

      Be sure that you copy the text using the copy button on code window.

  4. Sumesh

    Thanks, Gokhan.

    I have used dash dash only, but when I pasted the command in the blog it turned out as a long dash.

    When checking in the GitHub forums, I see starting from Docker 1.8 version the option ‘-d’ is deprecated.


    I am still searching into the docs and if I come to know of any solution, I will update here.

  5. Sumesh

    This time it’s complaining about the ‘shared memory size’

    [slc12mlv em]$ docker run -d –env-file /sc/db_env_file.dat -p 1521:1521 -p 5500:5500 -it –name skbdockerDB –shm-size=4g store/oracle/database-enterprise:
    flag provided but not defined: –shm-size
    See ‘docker run –help’.

  6. Srikanth Reddy K

    Great article. Could you please attach ENV file as well for my reference.? Or you can send me the file to my e-mail if possible. Thanks.

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.