A set of compose files I collected through the time.
*.yml
files are in .gitignore if you have to customize compose files to your needs, copy the desired templates and remove the tmpl
part or create a override.yml
file and override the values there - such as user/pass etc. the override.yml is automatically picked up by docker-compose
when you're in the root of this repo.
NOTE: non of these services are any close to production-ready!
!NOTE - integration tested with 11.2.0.2 XE
only!
Intention of this docker-compose is to provide a quick way to startup a local development environment with Oracle DB. The need of downloading the binaries and create an image with a separate script is not convenient from my point of view.
More details at official Oracle docker collection.
-
Copy the directory docker-context/scripts/otn-downloader/ to docker-context/oracle/DbSingleInstance/dockerfiles/11.2.0.2/
-
Create a copy of docker-compose.override.tmpl.yml - you can name it as you like,
override.yml
for example- Open the copied override.yml and enter your OTN (Oracle Technology Network) credentials
-
Start up Oracle DB service
docker-compose -f dcc.oracle.tmpl.yml -f override.yml up
Wait until you'll see
######################### DATABASE IS READY TO USE! #########################
You can do a quick check by opening APEX
docker-compose file based on official documentation of using Hana XE with docker
-
You've to be signed in with your Docker ID (
docker login
or the whale icon) - if you don't have one you can register for free.Though Hana XE is free of charge the docker image is distributed through the commercial docker hub, that's why you've to be logged in.
-
Start up Hana XE DB service
docker-compose -f dcc.hana-xe.tmpl.yml up
-
The image weights over 3GB and the initialization will take some time, go and get a ☕.
When HXE is ready, check its status
docker exec -it dcc_hana-xe_1 'HDB info'
If it fails, exec as root and full login shell
docker exec -it -u root dcc_hana-xe_1 su - hxeadm -c 'HDB info'
The container name 'dcc_hana-xe_1' might be different for you, if so check for its ID/name with
docker ps -a
Compose file based on https://hub.docker.com/r/microsoft/mssql-server/
- Pretty straight forward
docker-compose -f dcc.ms-sql.tmpl.yml up
A stack for a quick development setup for PHP
- Add
php-dev-stack.loc
to your/etc/hosts
file and point it to127.0.0.1
- Start up the stack
docker-compose -f dcc.php-dev-stack.tmpl.yml up
- Open php-dev-stack.loc in your browser to see the result of
phpinfo()
The configurations underneath docker-context/php-dev-stack are mounted into the service containers
- Apache and site config
- MySQL / MariaDB my.cnf
- php.ini
- index.php used as demonstration and it's printing the PHP settings
This way the configs can be easily changed on the host system.
What you probably wanna do is mounting your source code into the php-apache
container, by default the Apache in this container serves from /var/www/html
. To do so open your compose file, navigate to the php-apache
service and look for the volume
section
...
volumes:
...
# mount your source code to /var/www or /var/www/html
# NOTE: if your host is not a linux machine the FS performance is really bad if the amount of files is high!
- ./docker-context/php-dev-stack/html_dir:/var/www/html
...
and replace ./docker-context/php-dev-stack/html_dir
with the path of your source code.
To use
- Start multiple services (Oracle DB, HXE, MS SQL in this example)
Or you can of course assemble a compose file with all the services you need (like dcc.php-dev-stack.tmpl.yml).
docker-compose -f dcc.oracle.tmpl.yml -f dcc.hana-xe.tmpl.yml -f dcc.ms-sql.tmpl.yml -f override.yml up