Docker can not connect to exposed ports for Oracle 12c Container

I am trying to create a container for an Oracle 12c instance for testing. I am using the image available here: Oracle Image

I write the following docker commands as instructed on the page:

  • How to get local host IP address in docker container?
  • git push not working from jenkins docker
  • Microsoft Word crashes when invoking its COM inside Docker Container
  • How can I have MySQL persist on CoreOS Updates?
  • Supporting docker based and non docker based deployments
  • Cucumber on Travis CI container
  • docker pull sath89/oracle-12c
    docker run -d -p 8080:8080 -p 1521:1521 sath89/oracle-12c

    This gives me the following output when running docker ps:

    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                            NAMES
    ec8edeef718b        sath89/oracle-12c   "/ "   5 minutes ago       Up 5 minutes>1521/tcp,>8080/tcp   vigilant_johnson

    And the following output when running docker logs ec8edeef718b

    Database not initialized. Initializing database.
    Starting tnslsnr
    Copying database files
    1% complete
    3% complete
    11% complete
    18% complete
    26% complete
    37% complete
    Creating and starting Oracle instance
    40% complete
    45% complete
    50% complete
    55% complete
    56% complete
    60% complete
    62% complete
    Completing Database Creation
    66% complete
    70% complete
    73% complete
    85% complete
    96% complete
    100% complete
    Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/xe/xe.log" for further details.
    Configuring Apex console
    Database initialized. Please visit http://#containeer:8080/em http://#containeer:8080/apex for extra configuration if needed
    Starting web management console
    PL/SQL procedure successfully completed.
    Starting import from '/docker-entrypoint-initdb.d':
    found file /docker-entrypoint-initdb.d//docker-entrypoint-initdb.d/*
    [IMPORT] / ignoring /docker-entrypoint-initdb.d/*
    Import finished
    Database ready to use. Enjoy! ;)

    I’ve also logged in to the docker container and can connect to the oracle database using sqlplus.


    I can not connect to any port exposed by docker. If I run a command like:curl localhost:8080 I expect to get a response but I get the following error:

    curl: (56) Recv failure: Connection reset by peer

    Similarly for other docker containers I can not connect to an exposed port from a process in my Linux host.

    Running netstat – peanut in the host, I get the following result:

    Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/P                                            rogram name
    tcp6       0      0 :::8080                 :::*                    LISTEN      0          13221239    9994/                                            docker-proxy
    tcp6       0      0 :::1521                 :::*                    LISTEN      0          13220123    10006                                            /docker-proxy

    This makes me believe that the docker proxy is listening on that port. Subsequently I run netstat in the vm to see if there is a process listening internally.

    Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
    tcp        0      0  *               LISTEN      1001       13230948    -
    tcp        0      0  *               LISTEN      1001       13220287    -

    docker version

     Version:      17.05.0-ce-rc3
     API version:  1.29
     Go version:   go1.7.5
     Git commit:   90d35ab
     Built:        Tue May  2 17:58:25 2017
     OS/Arch:      linux/amd64
     Version:      17.05.0-ce-rc3
     API version:  1.29 (minimum version 1.12)
     Go version:   go1.7.5
     Git commit:   90d35ab
     Built:        Tue May  2 17:58:25 2017
     OS/Arch:      linux/amd64
     Experimental: false

    docker info

    Containers: 1
     Running: 1
     Paused: 0
     Stopped: 0
    Images: 1
    Server Version: 17.05.0-ce-rc3
    Storage Driver: aufs
     Root Dir: /var/lib/docker/aufs
     Backing Filesystem: extfs
     Dirs: 16
     Dirperm1 Supported: true
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
     Volume: local
     Network: bridge host macvlan null overlay
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init
    containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
    runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
    init version: 949e6fa
    Security Options:
      Profile: default
    Kernel Version: 4.8.0-49-generic
    Operating System: Ubuntu 16.04.2 LTS
    OSType: linux
    Architecture: x86_64
    CPUs: 4
    Total Memory: 31.42GiB
    Name: interfacing-dev0
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    Experimental: false
    Insecure Registries:
    Live Restore Enabled: false

  • Installing cabot via vagrant or docker
  • Building a docker image (.NET Core) and uploading it to Google Container Engine?
  • Docker Networking: Auto-discovering host names in a bridge network
  • Docker: In Dockerfile, copy files temporarily, but not for final image
  • How to run a docker container if not already running
  • Is there any way I can automate configuring Nexus 3?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.