Make sure you created the WebLogic Install image as described in Step 3 before proceeding.
Like I mentioned in one of the previous steps, Oracle has been awesome enough to provide us with some sample dockerfiles for constructing various docker images. In the samples directory of the OracleWebLogic project directory, you will find dockerfiles for building various domain images. Oracle has provided these samples for purposes of accelerating development of docker images for WebLogic. These are public use – so feel free to use these samples as a starting point for your projects.
We are going to create an image for a fairly simple domain configuration. In this domain we’ll have our usual admin server and one managed server.
The image we’re going to build is 1221-domain.
Change directory to docker-images/OracleWebLogic/samples/1221-domain and run the build.sh script with the parameters below.
1 2 |
$ cd docker-images/OracleWebLogic/samples/1221-domain $ ./build.sh ADMIN_PASSWORD=weblogic123 |
This build script will create a domain docker image with the following default parameters:
- Admin Port: 8001
- Admin Password: weblogic123
- Domain name: base_domain
- Production mode: dev
If you want to customize any of these parameters, take a look at the Dockerfile for 1221-domain. This file can be modified to over some default values for the domain.
Again, you can run docker images to see the image was indeed created.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE 1221-domain latest 8a5ba1a0637d 3 minutes ago 1.18 GB oracle/weblogic 12.2.1-developer 8f5708ba2680 2 hours ago 1.18 GB oracle/serverjre 8 b18ec85a7cbe 2 hours ago 382.2 MB oraclelinux latest 27a5201e554e 3 weeks ago 225.1 MB hello-world latest c54a2cc56cbb 6 months ago 1.848 kB |
For our last and final step, we can now go ahead and create a running domain. Step 5: Running WebLogic.