From 059647321c9bc3714bbbec40affcd27b4204e6e1 Mon Sep 17 00:00:00 2001 From: Rahul Vats Date: Thu, 16 Mar 2023 22:25:41 +0530 Subject: [PATCH] Fixed broken link: Issue : 2537 (#2569) * fixed broken link * fixing linting issues * fixing linting issues * fixing broken link and linting * corrected typo --------- Co-authored-by: Gerald Venzl --- OracleRestDataServices/README.md | 38 +++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/OracleRestDataServices/README.md b/OracleRestDataServices/README.md index 6057e1d700..f2521e22da 100644 --- a/OracleRestDataServices/README.md +++ b/OracleRestDataServices/README.md @@ -1,27 +1,33 @@ # Oracle REST Data Services on Docker -Sample Docker build files to facilitate installation, configuration, and environment setup for DevOps users. + +Sample Docker build files to facilitate installation, configuration, and environment setup for DevOps users. For more information about Oracle REST Data Services (ORDS) please see the [ORDS Documentation](http://www.oracle.com/technetwork/developer-tools/rest-data-services/documentation/index.html). ## How to build and run + This project offers sample Dockerfiles for Oracle REST Data Services - -To assist in building the images, you can use the [buildDockerImage.sh](dockerfiles/buildDockerImage.sh) script. See below for instructions and usage. -The `buildDockerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their prefered set of parameters. +To assist in building the images, you can use the [buildContainerImage.sh](dockerfiles/buildContainerImage.sh) script. See below for instructions and usage. + +The `buildContainerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their preferred set of parameters. ### Building Oracle REST Data Services Install Images -**IMPORTANT:** You can provide the installation binaries of ORDS and put them into the `dockerfiles` folder. You only need to provide the binaries for the version you are going to install. The binaries can be downloaded from the [Oracle Technology Network](http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html) and placed in `OracleRestDataServices/dockerfiles` directory. Note that you must not uncompress the binaries. The script will handle that for you and fail if you uncompress them manually! + +**IMPORTANT:** You can provide the installation binaries of ORDS and put them into the `dockerfiles` folder. You only need to provide the binaries for the version you are going to install.\ +The binaries can be downloaded from the [Oracle Technology Network](http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html) and placed in `OracleRestDataServices/dockerfiles` directory. Note that you must not uncompress the binaries. The script will handle that for you and fail if you uncompress them manually! **If no binaries are provided, [the latest ords zip](https://download.oracle.com/otn_software/java/ords/ords-latest.zip) file is downloaded automatically.** -The image builds on top of the `oracle/serverjre:8` image which is also provided in this repository, see [OracleJava](../OracleJava). This base image is fetched from the container registry. So for successful fetch the user needs to login to the [contaienr-registry](container-registry.oracle.com) and accept the license agreement. The user can also build the `oracle/serverjre:8` image locally before building this image using the [OracleJava](../OracleJava) repo. After building this image locally, the user can run the following command: +The image builds on top of the `oracle/serverjre:8` image which is also provided in this repository, see [OracleJava](../OracleJava). This base image is fetched from the container registry. So for successful fetch the user needs to login to the [container-registry](container-registry.oracle.com) and accept the license agreement.\ +The user can also build the `oracle/serverjre:8` image locally before building this image using the [OracleJava](../OracleJava) repo. After building this image locally, the user can run the following command: -``` +```bash ./buildContainerImage.sh -o '--build-arg BASE_IMAGE=' ``` -Before you build the image make sure that you have provided the installation binaries and put them into the right folder. Once you have done that go into the **dockerfiles** folder and run the **buildDockerImage.sh** script: +Before you build the image make sure that you have provided the installation binaries and put them into the right folder. Once you have done that go into the **dockerfiles** folder and run the **buildContainerImage.sh** script: +```bash [oracle@localhost dockerfiles]$ ./buildContainerImage.sh -h Usage: buildContainerImage.sh [-i] [-o] [Docker build option] @@ -34,32 +40,40 @@ Before you build the image make sure that you have provided the installation bin LICENSE UPL 1.0 Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. +``` **IMPORTANT:** The resulting images will be an image with the ORDS binaries installed. On first startup of the container ORDS will be setup. ### Running Oracle REST Data Services in a Docker container -Before you run your ORDS Docker container you will have to specify a network in wich ORDS will communicate with the database you would like it to expose via REST. +Before you run your ORDS Docker container you will have to specify a network in which ORDS will communicate with the database you would like it to expose via REST. In order to do so you need to create a [user-defined network](https://docs.docker.com/engine/userguide/networking/#user-defined-networks) first. This can be done via following command: - docker network create +```bash + docker network create +``` Once you have created the network you can double check by running: +```bash docker network ls +``` You should see your network, amongst others, in the output. As a next step you will have to start your database container with the specified network. This can be done via the `docker run` `--network` option, for example: +```bash docker run --name oracledb --network= oracle/database:12.2.0.1-ee +``` The database container will be visible within the network by its name passed on with the `--name` option, in the example above **oracledb**. Once your database container is up and running and the database available, you can run a new ORDS container. To run your ORDS Docker image use the **docker run** command as follows: +```bash docker run --name \ --network= \ -p :8888 \ @@ -88,18 +102,22 @@ To run your ORDS Docker image use the **docker run** command as follows: The data volume to use for the ORDS configuration files. Has to be writable by the Unix "oracle" (uid: 54321) user inside the container! If omitted the ORDS configuration files will not be persisted over container recreation. +``` Once the container has been started and ORDS configured you can send REST calls to ORDS. ## Known issues + None ## Support ## License + To download and run ORDS, regardless whether inside or outside a Docker container, you must download the binaries from the Oracle website and accept the license indicated at that page. All scripts and files hosted in this project and GitHub [docker-images/OracleRestDataServices](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License (UPL), Version 1.0. ## Copyright + Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved.