This repository has been archived by the owner on Sep 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
Setup Via Docker Compose #39
Open
CycleOfTheAbsurd
wants to merge
2
commits into
fuzziebrain:master
Choose a base branch
from
CycleOfTheAbsurd:compose
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,10 @@ | |
<!-- TOC depthFrom:2 --> | ||
|
||
- [Prerequisites](#prerequisites) | ||
- [Build Image](#build-image) | ||
- [Run Container](#run-container) | ||
- [Setup with Docker Compose](#setup-with-docker-compose) | ||
- [Manual Setup](#manual-setup) | ||
- [Build Image](#build-image) | ||
- [Run Container](#run-container) | ||
- [Container Commands](#container-commands) | ||
- [Other](#other) | ||
- [SQL](#sql) | ||
|
@@ -20,13 +22,39 @@ | |
|
||
## Prerequisites | ||
|
||
1. [Download](https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html) the RPM from Oracle Technology Network and save to folder. We will assume it is in `~/Downloads/oracle-database-xe-18c-1.0-1.x86_64.rpm`. | ||
1. [Download](https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html) the RPM from Oracle Technology Network and save to folder. We will assume it is in `~/Downloads/oracle-database-xe-VERSION.rpm`. | ||
|
||
1. _Optional:_ Setup docker network: `docker network create oracle_network`. This is useful if you want other containers to connect to your database (ORDS for example). You can change `oracle_network` for any name you want, however this name will be used in all the code snippets below. | ||
The following steps are not necessary if you use the [docker-compose setup method](#setup-with-docker-compose): | ||
|
||
1. _Optional:_ Setup docker network: `docker network create oracle_network`. This is useful if you want other containers to connect to your database (ORDS for example). You can change `oracle_network` for any name you want, however this name will be used in all the code snippets below. | ||
|
||
1. _Optional:_ Create a folder `mkdir ~/docker/oracle-xe` which will store your Oracle XE data to be preserved after the container is destroyed. | ||
|
||
## Build Image | ||
## Setup With Docker Compose | ||
|
||
*Note*: Use this setup method or the [manual one](#manual-setup) not both. | ||
|
||
```bash | ||
-- Clone repo | ||
git clone [email protected]:fuzziebrain/docker-oracle-xe.git | ||
|
||
-- Set the working directory to the project folder | ||
cd docker-oracle-xe | ||
|
||
-- Copy the RPMs to docker-odb18c-xe/files | ||
cp ~/Downloads/oracle-database-xe-*.rpm files/ | ||
-- Build Image | ||
docker-compose build | ||
|
||
-- Run Container | ||
docker-compose up | ||
``` | ||
|
||
## Manual Setup | ||
|
||
*Note*: Use this setup method or the [Docker Compose one](#setup-with-docker-compose) not both. | ||
|
||
### Build Image | ||
|
||
```bash | ||
-- Clone repo | ||
|
@@ -42,7 +70,7 @@ cp ~/Downloads/oracle-database-xe-18c-1.0-1.x86_64.rpm files/ | |
docker build -t oracle-xe:18c . | ||
``` | ||
|
||
## Run Container | ||
### Run Container | ||
|
||
_Note first time will take a a while to run for as the `oracle-xe configure` script needs to complete_ | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: "3.7" | ||
services: | ||
|
||
oracle-xe: | ||
build: | ||
context: ./ | ||
image: oracle-xe:18c | ||
ports: | ||
- "32118:1521" | ||
- "35518:5500" | ||
volumes: | ||
- oracle-xe-volume:/opt/oracle/oradata | ||
|
||
|
||
networks: | ||
default: | ||
name: "oracle_network" | ||
|
||
volumes: | ||
oracle-xe-volume: {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: any specific reason for requiring composer file format 3.7? The compose file seems pretty simple a first sight, and I would rather specify the lowest supported version of the format as general guideline....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a good point, I did it out of habit. I'll check to see the lowest compatible version.