Managing Dev, Test, Training Apex environment with Docker

Development environments

Sample output of XE/Apex log
Export/Import sample screen from Apex App. builder

Testing Apex applications

$ docker run -d --privileged -v --name plugin_btrfs /var/lib/docker/volumes:/var/lib/docker/volumes -v /run/docker/plugins:/run/docker/plugins anybox/buttervolume
$ docker run -d --shm-size=1g --name apex --hostname apex \
-p 1521:1521 -p 8080:8080 \
-v $PWD/apex-as-postscripts:/u01/app/oracle/scripts/setup \
--volume-driver=btrfs \
-v apex-5.1.4:/u01/app/oracle/oradata \
oracle/database:11.2.0.2-xe
Change initial random generated password
$ docker exec plugin_btrfs buttervolume snapshot apex-5.1.4
apex-5.1.4@2017-09-19T11:37:08.534982
$ docker exec plugin_btrfs buttervolume restore "apex-5.1.4@2017-09-19T11:37:08.534982" apex-5.1.4-app1
$ docker exec plugin_btrfs buttervolume restore "apex-5.1.4@2017-09-19T11:37:08.534982" apex-5.1.4-app2
$ docker volume ls
DRIVER VOLUME NAME
btrfs apex-5.1.4
btrfs apex-5.1.4-app1
btrfs apex-5.1.4-app2
$ docker run -d --shm-size=1g --name apex-app1 --hostname apex \
-p 15121:1521 -p 8081:8080 \
--volume-driver=btrfs \
-v apex-5.1.4-app1:/u01/app/oracle/oradata \
oracle/database:11.2.0.2-xe
$ docker run -d --shm-size=1g --name apex-app2 --hostname apex \
-p 15221:1521 -p 8082:8080 \
--volume-driver=btrfs \
-v apex-5.1.4-app2:/u01/app/oracle/oradata \
oracle/database:11.2.0.2-xe
$ docker rm -f apex-app1
$ docker volume rm apex-5.1.4-app1
$ docker exec plugin_btrfs buttervolume restore "apex-5.1.4@2017-09-19T11:37:08.534982" apex-5.1.4-app1
$ docker run -d --shm-size=1g --name apex-app1 --hostname apex \
-p 15121:1521 -p 8081:8080 \
--volume-driver=btrfs \
-v apex-5.1.4-app1:/u01/app/oracle/oradata \
oracle/database:11.2.0.2-xe

Training Apex on Docker

$ btrfs subvolume snapshot /var/lib/docker/volumes/apex-5.1.4 /var/lib/docker/volumes/apex-5.1.4-student1
$ btrfs subvolume snapshot /var/lib/docker/volumes/apex-5.1.4 /var/lib/docker/volumes/apex-5.1.4-student2
....
$ btrfs subvolume snapshot /var/lib/docker/volumes/apex-5.1.4 /var/lib/docker/volumes/apex-5.1.4-studentN
$ docker volume ls
DRIVER VOLUME NAME
btrfs apex-5.1.4
btrfs apex-5.1.4-student1
btrfs apex-5.1.4-student2
.....
btrfs apex-5.1.4-studentN
$ docker run -d --shm-size=1g --name apex-student1 --hostname apex \
-p 15121:1521 -p 8081:8080 \
--volume-driver=btrfs \
-v apex-5.1.4-student1:/u01/app/oracle/oradata \
oracle/database:11.2.0.2-xe
.....
$ docker run -d --shm-size=1g --name apex-studentN --hostname apex \
-p 15N21:1521 -p 808N:8080 \
--volume-driver=btrfs \
-v apex-5.1.4-studentN:/u01/app/oracle/oradata \
oracle/database:11.2.0.2-xe
$ docker exec plugin_btrfs buttervolume clone apex-5.1.4 apex-5.1.4-student1

--

--

--

https://apex.oracle.com/pls/apex/f?p=ACES:DIRECTORY:::::SEARCH:Marcelo+Ochoa

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Chain Saws, 3/4 tons and PHP

Product-thinking and secure delivery — DevOps Enterprise Summit 2019 — Day One Recap

Intro to the Big-O Notation

Flutter web and iframe

SQL 101: Cross Joins And Their Use Cases

Firewall Exploration — A Network Security SEEDLab

For Loops using Modulus %

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marcelo Ochoa

Marcelo Ochoa

https://apex.oracle.com/pls/apex/f?p=ACES:DIRECTORY:::::SEARCH:Marcelo+Ochoa

More from Medium

Microservices and K8S: Antipatterns

Fix no require module provides package

Dev platform architecture — Part 4 — Control Center sample implementation

Fundamentals of OpenIdConnect(OIDC)