Created
October 11, 2023 21:45
-
-
Save ErnestoRB/fc9240ff14570d99301464f1415053d3 to your computer and use it in GitHub Desktop.
Oracle Database Express on Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
database: | |
image: container-registry.oracle.com/database/express:latest | |
environment: | |
- ORACLE_PWD=PRUEBA123 | |
volumes: | |
- ./data:/opt/oracle/oradata | |
ports: | |
- "1521:1521" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ! -s data ]] | |
then | |
echo 'Creating folder data/' | |
if [[ $? -ne 0 ]] | |
then | |
exit 1 | |
fi | |
mkdir data | |
fi | |
if [[ $(ls -n data | grep 54321 | wc -l) -ge 1 ]] | |
then | |
echo 'Folder data/ already owned by oracle user' | |
exit 0 | |
fi | |
echo 'Requesting sudo permission to change data/ ownership top oracle user (54321)' | |
sudo chown 54321 data | |
if [[ $? -eq 0 ]] | |
then | |
echo 'Folder now owned by oracle user' | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment