Oracle SOA Suite 12c Docker Image built with Packer

September 04, 2015

Reading time ~1 minute

After find some limitations on building SOA Docker image using Dockerfile (as volume access, default size image) I researched on how to improve building process and I found Packer (from the same guy that creates Vagrant).

To check why using Packer instead of Dockerfiles, go here.

I also moved OracleSOA directory from my forked oracle-docker repository to an independent repository: github.com/jeqo/oracle-soa-12c-docker.

Improvements

Basically Dockerfile scripts were moved to shell scripts and are called from Packer.

  "provisioners": [
    {
      "type": "shell",
      "scripts": [
        "scripts/create-user.sh"
      ]
    },
    {
      "type": "file",
      "source": "./files/",
      "destination": "/u01/"
    },
    {
      "type": "shell",
      "scripts": [
        "scripts/install-java.sh"
      ],
      "environment_vars": [
        "JAVA_RPM=/data/{{user `java_rpm`}}"
      ]
    },
    {
      "type": "shell",
      "scripts": [
        "scripts/install-soa.sh"
      ],
      "environment_vars": [
        "SOA_ZIP=/data/{{user `soa_zip`}}",
        "SOA_PKG={{user `soa_pkg`}}",
        "SOA_PKG2={{user `soa_pkg2`}}",
        "JAVA_HOME=/usr/java/default",
        "MW_HOME=/u01/oracle/soa"
      ]
    }
  ]

After provisioning, you can save your image, and if you want push it to Docker Hub:

  "post-processors": [
    [
      {
        "type": "docker-tag",
        "repository": "jeqo/oracle-soa-12c",
        "tag": "12.1.3-dev"
      },
      "docker-push"
    ]
  ]

Very simple and straightforward JSON configuration.

Now you have a Docker image with SOA installer, ready to create your domain as this sample explained on my previous post.

Source: jeqo.github.io/blog

Jorge is part of the middleware team at Sysco and an Oracle ACE Associate . He has developed business solutions based on Oracle Fusion Middleware technologies since 2010. Also he is certified as SOA Architect and Implementation Specialist at BPM, SOA and WebLogic products.

Get “non XML” file on request based on a file name and send it via HTTP POST with OSB 12c

Requirement is fairly simple, there is a need to transfer a “non XML” file (in this specific case .pdf document) based on the file name w...… Continue reading