Skip to content

Commit a665baf

Browse files
committed
Resolve issues #10 and #11
1 parent 932b3dc commit a665baf

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ $RECYCLE.BIN/
8686
*.rpm
8787
*.tar
8888
*.gz
89+
*.swp
8990
tmp
9091
dockerfiles
9192
oradata
93+
*-oradata
9294
*.env
9395
*.bak

02-run.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,29 @@ ENV_FILE=${2:-.env}
88
BASE_DIR=$(pwd -P)
99
DB_VERSION=${DB_VERSION:-18.4.0}
1010
DB_EDITION=$(echo ${DB_EDITION:-xe} | tr '[:upper:]' '[:lower:]')
11+
HOST_DATA_DIR=${CONTAINER_NAME}-oradata
1112

1213
echo "##### Removing any previous containers #####"
1314
docker rm -vf $CONTAINER_NAME
1415

15-
if [ ! -d "oradata" ]; then
16-
mkdir oradata
16+
if [ ! -d "${HOST_DATA_DIR}" ]; then
17+
mkdir $HOST_DATA_DIR
1718
fi
1819

1920
echo "##### Changing file ownership. May require password to continue. #####"
20-
sudo chown 54321:54321 oradata
21+
sudo chown 54321:543321 ${HOST_DATA_DIR} || chmod 777 ${HOST_DATA_DIR}
2122

2223
echo "##### Creating container $CONTAINER_NAME #####"
2324
docker run -d --name $CONTAINER_NAME \
2425
-p ${DOCKER_ORDS_PORT:-50080}:8080 \
2526
-p ${DOCKER_EM_PORT:-55500}:5500 \
2627
-p ${DOCKER_DB_PORT:-51521}:1521 \
2728
--env-file $ENV_FILE \
28-
-v $PWD/oradata:/opt/oracle/oradata \
29+
-v $PWD/$HOST_DATA_DIR:/opt/oracle/oradata \
2930
-v $PWD/scripts/setup:/opt/oracle/scripts/setup \
3031
-v $PWD/scripts/startup:/opt/oracle/scripts/startup \
3132
-v $PWD/files:/tmp/files \
3233
oracle/database:${DB_VERSION}-${DB_EDITION}
3334

3435
echo "##### Tailing logs. Ctrl-C to exit. #####"
35-
docker logs -f $CONTAINER_NAME
36+
docker logs -f $CONTAINER_NAME

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
$ . 02-run.sh axer mysettings.env
4949
```
5050

51-
> **IMPORTANT**
52-
>
53-
> The second script requires `sudo` rights. If your user does not have this privilege, comment out `sudo chown 54321:54321 oradata` and replace it with `chmod 777 oradata`.
54-
5551
Using the sample settings, the following are accessible:
5652

5753
| Port | Application | URL |

0 commit comments

Comments
 (0)