Run oracle container in docker


Oracle

  1. Go to the oracle container in docker hub

    https://hub.docker.com/_/oracle-database-enterprise-edition

  2. Accept the license

    • Fill the ccontact form
    • Agree the license
    • Agree the share
    • Don’t keep the service publisher

Docker

  1. Login the docker

    docker login
  2. Pull the docker image

    docker pull store/oracle/database-enterprise:12.2.0.1
  3. Run the container in foreground

    docker run -it --name oracle -P store/oracle/database-enterprise:12.2.0.1

    option -P indicates the ports are allocated by Docker. The mapped port can be discovered by executing

  4. Check the exposed ports

    docker port oracle

Connect

  1. Open navicat application

  2. Edit connection

         Connection Name: docker-oracle
                    Type: Basic
    Host Name/IP Address: 127.0.0.1
        Service Name/SID: ORCLCDB (SID)
                    Role: SYSDBA
               User Name: sys
                Password: Oradoc_db1

Other

Show all containers

docker ps -a

Remove contaimer

docker rm [CONTAINER_ID]

Reference

Setup documentation

  • Docker Hub > My Content > Oracle Database Enterprise Edition > Setup