Provisioning WebLogic Server in less than 1 minute using Docker

We are going to demonstrate how to provision Oracle WebLogic Server in less than 1 minute Using Docker running on Ubuntu.

Prerequisites
To follow this tutorial, you will need Ubuntu 64-bit up and running. We will be using Ubuntu version 16.04 in our fancy VirtualBox sandbox machine. This is because Docker requires a 64-bit version of Ubuntu as well as a kernel version equal to or greater than 3.10.

1. Installing docker on Ubuntu:

#Add the GPG key for the official Docker repository to our system:
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

#Add the Docker repository to apt sources:
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update

#we make sure that we use Docker repo instead of default Ubuntu repo:
sudo apt-cache policy docker-engine

#installing Docker
$ sudo apt-get install -y docker-engine

Verifying installation and displaying information about Docker:

$ docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 48b5124b2768 3 months ago 1.84kB

$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.

#Other check commands
$ sudo systemctl status docker
$ docker info

2. Provisioning WebLogic Server Domain

Our docker is ready to roll so we navigate to docker hub website:

https://hub.docker.com/r/playniuniu/weblogic-domain

or simply go to https://hub.docker.com and search for “weblogic” docker images.

https://hub.docker.com/r/playniuniu/weblogic-domain we copy the following command:

docker run -d -p 8001:8001 –name=wlsadmin playniuniu/weblogic-domain:12.2.1.2 startWebLogic.sh

Run it and after a while (depends on your network speed) a brand new WebLogic Server domain is up and running:

$ docker run -d -p 8001:8001 --name=wlsadmin playniuniu/weblogic-domain:12.2.1.2 startWebLogic.sh
Unable to find image 'playniuniu/weblogic-domain:12.2.1.2' locally
12.2.1.2: Pulling from playniuniu/weblogic-domain
8d30e94188e7: Pull complete
1d43e94144e5: Pull complete
...
Status: Downloaded newer image for playniuniu/weblogic-domain:12.2.1.2

Voila! We can login to WLS Admin Console http://ubuntuhost:8001/console using credentials weblogic/welcome1 and check if managed server (AdminServer) is up.

Learn more about Docker: