From b84e329978669bd171e7ee94b53ee1e4f291dfb1 Mon Sep 17 00:00:00 2001 From: lcesta Date: Tue, 16 Apr 2024 16:00:33 +0200 Subject: [PATCH] add readme --- Dockerfile | 2 +- README.MD | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 README.MD diff --git a/Dockerfile b/Dockerfile index bc05e68..57c182a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ from container-registry.oracle.com/database/free:23.3.0.0 -COPY docker-entrypoint.sh /usr/local/bin/ +COPY --chmod=777 docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] \ No newline at end of file diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..77cd664 --- /dev/null +++ b/README.MD @@ -0,0 +1,21 @@ +# ORACLEDB-INIT + +ORACLEDB-INIT is designed to initialize a schema within an Oracle database if it does not already exist. It utilizes SQL*Plus to execute SQL commands within the Oracle database environment. + +The script executed within the Docker container performs the following actions: + +1. Checks if the specified user exists in the database. +2. If the user does not exist, it creates the user with the provided username and password. +3. Grants necessary privileges to the created user. + +## Usage + +`docker run -e ADMIN_USER= -e ADMIN_PASSWORD= -e DB_USER= -e PASSWORD= -e dsn= oracledb-init` + +## Environment Variables + +- `ADMIN_USER`: The admin username of the Oracle database. +- `ADMIN_PASSWORD`: The admin password of the Oracle database. +- `DB_USER`: The username of the schema to be initialized. +- `PASSWORD`: The password for the new schema. +- `DSN`: The Oracle Data Source Name (DSN) for connection.