4. How to use docker-compose for Oracle WebLogic Application deployment?

Опубликовано: 28 Май 2026
на канале: Pavan Devarakonda
1,771
22

Step 1: Create a fresh folder name it as wls_build
mkdir wls_build
cd wls_build

Step 2: Create docker-compose.yml as given below

vi docker-compose.yml
wls:
build: .
ports:
"7001:7001"
command:
startWebLogic.sh

Step 3: Now lets build the the docker image with the docker-compose command using build option, Dockerfile uses benefits.war file as deployment unit.
vi Dockerfile
Pull base image
---------------
FROM 12212-domain

Maintainer
----------
MAINTAINER Pavan Devarakonda [email protected]

Define variables
ENV APP_NAME="benefits_docker" \
APP_PKG_FILE="benefits.war" \
APP_PKG_LOCATION="/u01/oracle"

Copy files and deploy application in WLST Offline mode
COPY container-scripts/* /u01/oracle/

RUN wlst /u01/oracle/app-deploy.py


docker-compose build

Step 4: Bring up the docker container using 'up' with -d for run in background detach mode
docker-compose up -d

Step 5: Validate the container creation using 'ps'
docker-compose ps

Step 6: Check the WebLogic admin log
docker-compose logs -f

Step 7: Access the Admin console using "http://192.168.33.100:7001/console"
Step 8: Check the application URL using "http://192.168.33.100:7001/benefits"

browse more fun: http://wlatricksntips.blogspot.in/201...

Please visit our blogs:
My FMW Experiments : https://myofmwexperiments.blogspot.com
WLST By Examples : https://wlstbyexamples.blogspot.com
WebLogic Tricks Tips: https://wlatricksntips.blogspot.com
DevOps Hunter : https://devopshunter.blogspot.com
#PavanDevarakonda