A method tutorial for quickly building an Oracle development environment using Docker
- 2020-06-15 10:39:44
- OfStack
preface
oracle is so large that it would be expensive for developers to have one oracle installed natively.
In the docker environment, I searched for a long time and found that the wnameless/ ES9en-ES10en-11ES11en mirror was not bad and it was very easy to build.
But I also found a problem with mounting the local volume. Once mounted, you cannot log in. One version of fork was found in the official issues to solve this problem, record 1.
Create the ES18en-ES19en working directory
mkdir -p oracle/data
cd oracle
touch docker-compose.yml
Configuration docker - compose. yml
version: '2'
services:
oracle:
image: sath89/oracle-xe-11g
container_name: oracle
ports:
- 1521:1521
volumes:
- ./data:/u01/app/oracle
Start the container
# Start the oracle
docker-compose up -d
# Closed container
docker-compose kill
Login oracle
Parameters used for login:
SID: xe
username: admin
password: oracle
After entering, modify the password and create a user.
Why bind to a local volume
The wnameless version failed to bind to the local volume, causing us to restart the container or rebuild the container once all our operations in the database, the tables we created, the data, and so on were lost.
Bound to a local volume, you can persist the container's data to the native. Sauce.
conclusion