Giter Club home page Giter Club logo

oracle19c-docker's Introduction

oracle19c-docker

A lightweight and configurable Oracle 19c docker image.

Oracle has introduced the concept of container databases (CDB) and pluggable databases (PDB). Containers are used for multi-tenancy and contain pluggable databases. Pluggable databases are what you are probably used to, a self contained database that you connect to. By default, this image creates one CDB, and one PDB within that CDB.

Note that Oracle is shifting away from an SID and using service names instead. PDB use service names, CDB use SIDs. However, usernames for CDB must start with C##, ie C##STEVE. So to make things simple, we are focusing on just using the single PDB.

I used to maintain a standalone repository for building this image. It was originally based on the official images, like my Oracle 12c one here: https://github.com/steveswinsburg/oracle12c-docker

Oracle have since improved their docker images and I have worked with Oracle on making the the memory configurable (see oracle/docker-images#1575), so all we need now are simplified instructions.

Before you begin

  1. Clone https://github.com/oracle/docker-images.
  2. Download the Oracle Database 19c binary from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
    1. For X86, get LINUX.X64_193000_db_home.zip.
    2. For ARM, get LINUX.ARM64_1919000_db_home.zip.
  3. Put the zip in the OracleDatabase/SingleInstance/dockerfiles/19.3.0 directory. Do not unzip it.
  4. In your docker application (e.g. Colima, Docker Desktop etc), ensure you have a large enough amount of memory allocated to docker. These instructions will set the total memory to 4000MB, so make sure Docker has a value higher than that.

Start your container environment

These instructions assume you are using Colima. Start up colima with the -e flag and an editor will open where you can review your settings. Also note that these instructions are assuming v0.5.3 and MacOS >= 13 (Ventura).

colima start -e

For x86:

# Number of CPUs to be allocated to the virtual machine.
# Default: 2
cpu: 4
 
# Size of the disk in GiB to be allocated to the virtual machine.
# NOTE: changing this has no effect after the virtual machine has been created.
# Default: 60
disk: 100
 
# Size of the memory in GiB to be allocated to the virtual machine.
# Default: 2
memory: 8
 
# Architecture of the virtual machine (x86_64, aarch64, host).
# Default: host
arch: x86_64
 
# Container runtime to be used (docker, containerd).
# Default: docker
runtime: docker

...
 
# Virtual Machine type (qemu, vz)
# NOTE: this is macOS 13 only. For Linux and macOS <13.0, qemu is always used.
#
# vz is macOS virtualization framework and requires macOS 13
#
# Default: qemu
vmType: vz
 
# Volume mount driver for the virtual machine (virtiofs, 9p, sshfs).
#
# virtiofs is limited to macOS and vmType `vz`. It is the fastest of the options.
#
# 9p is the recommended and the most stable option for vmType `qemu`.
#
# sshfs is faster than 9p but the least reliable of the options (when there are lots
# of concurrent reads or writes).
#
# Default: virtiofs (for vz), sshfs (for qemu)
mountType: virtiofs

For ARM:

# Number of CPUs to be allocated to the virtual machine.
# Default: 2
cpu: 4
 
# Size of the disk in GiB to be allocated to the virtual machine.
# NOTE: changing this has no effect after the virtual machine has been created.
# Default: 60
disk: 100
 
# Size of the memory in GiB to be allocated to the virtual machine.
# Default: 2
memory: 8
 
# Architecture of the virtual machine (x86_64, aarch64, host).
# Default: host
arch: aarch64
 
# Container runtime to be used (docker, containerd).
# Default: docker
runtime: docker

...
 
# Virtual Machine type (qemu, vz)
# NOTE: this is macOS 13 only. For Linux and macOS <13.0, qemu is always used.
#
# vz is macOS virtualization framework and requires macOS 13
#
# Default: qemu
vmType: vz

# Utilise rosetta for amd64 emulation (requires m1 mac and vmType `vz`)
# Default: false
rosetta: true
 
# Volume mount driver for the virtual machine (virtiofs, 9p, sshfs).
#
# virtiofs is limited to macOS and vmType `vz`. It is the fastest of the options.
#
# 9p is the recommended and the most stable option for vmType `qemu`.
#
# sshfs is faster than 9p but the least reliable of the options (when there are lots
# of concurrent reads or writes).
#
# Default: virtiofs (for vz), sshfs (for qemu)
mountType: virtiofs

Building

cd OracleDatabase/SingleInstance/dockerfiles
./buildContainerImage.sh -v 19.3.0 -e

If the build fails saying you are out of space, check how much space you have available on your disk. If it looks ok, prune old Docker images via: yes | docker image prune > /dev/null

Running

To use the sensible defaults:

docker run \
--name oracle19c \
-p 1521:1521 \
-p 5500:5500 \
-e ORACLE_PDB=orcl \
-e ORACLE_PWD=password \
-e INIT_SGA_SIZE=3000 \
-e INIT_PGA_SIZE=1000 \
-v /opt/oracle/oradata \
-d \
oracle/database:19.3.0-ee

On first run, the database will be created and setup for you. This will take about 10-15 minutes. Open the container logs and watch the progress. Then you can connect.

Optionally, you can use the following run command to avoid getting "No disk space" issues as you gradually insert more and more data into your database.

docker run \
--name oracle19c \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_PDB=orcl \
-e ORACLE_PWD=password \
-e INIT_SGA_SIZE=3000 \
-e INIT_PGA_SIZE=1000 \
-v /Users/<your-username>/path/to/store/db/files/:/opt/oracle/oradata \
-d \
oracle/database:19.3.0-ee

Configuration

   --name:        The name of the container (default: auto generated)
   -p:            The port mapping of the host port to the container port.
                  Two ports are exposed: 1521 (Oracle Listener), 5500 (OEM Express)
   -e ORACLE_SID: The Oracle Database SID that should be used (default: ORCLCDB)
   -e ORACLE_PDB: The Oracle Database Service Name that should be used (default: ORCLPDB1)
   -e ORACLE_PWD: The Oracle Database SYS password (default: auto generated)
   -e INIT_SGA_SIZE: The amount of SGA to allocate to Oracle. This should be 75% of the total memory you want Oracle to use. 
   -e INIT_PGA_SIZE: The amount of PGA to alloxate to oracle. This should be the remaining 25% of the total memory you want Oracle to use.  
   -e ORACLE_CHARACTERSET: The character set to use when creating the database (default: AL32UTF8)
   -v /opt/oracle/oradata
                  The data volume to use for the database.
                  Has to be writable by the Unix "oracle" (uid: 54321) user inside the container!
                  If omitted the database will not be persisted over container recreation.
   -v /Users/<your-username>/path/to/store/db/files/:/opt/oracle/oradata
                  Mount the data volume into one of your local folders.
                  If omitted you might run into a "No disk space" issue at some point as your database keeps growing and docker does not resize its volume.
   -d:            Run in detached mode. You want this otherwise `Ctrl-C` will kill the container.

Note that if you do not specify INIT_SGA_SIZE and INIT_PGA_SIZE then Oracle will determine the memory to allocate based on the number of CPUs, available memory in your machine etc, and for desktop environments this could be from about 2000MB to 5000MB. If you want control over this, set the values.

Connecting to Oracle

Once the container has been started you can connect to it like any other database. Note we are using Service Name and not the SID (since PDB uses Service Name).

For example, SQL Developer:

Hostname: localhost
Port: 1521
Service Name: <your service name>
Username: sys
Password: <your password>
Role: AS SYSDBA

Changing the password

Note: If you did not set the ORACLE_PWD parameter, check the docker run output for the password.

The password for the SYS account can be changed via the docker exec command. Note, the container has to be running:

First run docker ps to get the container ID. Then run: docker exec <container id> ./setPassword.sh <new password>

Getting a shell on the container

First run docker ps to get the container ID. Then run: docker exec -it <container id> /bin/bash

Or as root: docker exec -u 0 -it <container id> /bin/bash

Using SQLPlus within the container

Once on the container (see above), connect to SQLPlus like so:

sqlplus /nolog
connect sys/password@orcl as sysdba

oracle19c-docker's People

Contributors

amiedavis avatar steveswinsburg avatar xfeier53 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oracle19c-docker's Issues

Upon restart, it says installation was not successful

Successful install and could connect. Restarted and got these errors:

ORACLE_SID: orcl
ORACLE_PDB: ORCLPDB1
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: password
ORACLE_CDB: false
ORACLE_PDB_NUM: 0
ORACLE_MEM: 4000
2019-08-01T03:08:58.510558522Z 
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 01-AUG-2019 03:08:58
2019-08-01T03:08:58.510598886Z 
Copyright (c) 1991, 2019, Oracle.  All rights reserved.
2019-08-01T03:08:58.510608052Z 
Starting /opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...
2019-08-01T03:08:58.591851965Z 
TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/56099cd8ad74/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
2019-08-01T03:08:58.971212234Z 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                01-AUG-2019 03:08:58
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/56099cd8ad74/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/orcl.
Database Information:
Global Database Name:orcl
System Identifier(SID):orcl
Look at the log file "/opt/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
2019-08-01T03:18:06.499051076Z 
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Aug 1 03:18:06 2019
Version 19.3.0.0.0
2019-08-01T03:18:06.499080417Z 
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
2019-08-01T03:18:06.499095805Z 
2019-08-01T03:18:06.522773466Z 
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
2019-08-01T03:18:06.522802683Z 
SQL> 
System altered.
2019-08-01T03:18:06.529415579Z 
SQL> 
System altered.
2019-08-01T03:18:06.538810436Z 
SQL>    ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-65090: operation only allowed in a container database
2019-08-01T03:18:06.549303343Z 
2019-08-01T03:18:06.549305639Z 
SQL> 
PL/SQL procedure successfully completed.
2019-08-01T03:18:06.604587925Z 
SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
The Oracle base remains unchanged with value /opt/oracle
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
29170717,29173618,29181568,29182920,29183298,29186091,29191827,29201143,
29201695,29209545,29210577,29210610,29210624,29210683,29213641,29219627,
29224294,29225861,29229839,29235934,29242906,29243749,29244495,29244766,
29244968,29248723,29249583,29251564,29255616,29260224,29261695,29271019,
29273360,29282090,29282666,29285453,29285621,29290235,29292232,29293806,
29294753,29299830,29307090,29307109,29311336,29329675,29330791,29339299,
29357821,29360467,29360775,29367971,29368725,29379299,29379381,29380527,
29381000,29382296,29391301,29393649,29402110,29411931,29413360,29457319,
29465047
===========================================================
2019-08-01T03:18:08.740558+00:00
Resize operation completed for file# 4, old size 337920K, new size 343040K
Resize operation completed for file# 4, old size 343040K, new size 348160K
2019-08-01T04:00:37.868908+00:00
Resize operation completed for file# 3, old size 512000K, new size 522240K
2019-08-01T04:00:38.547269+00:00
Resize operation completed for file# 3, old size 522240K, new size 542720K
2019-08-01T04:12:58.902581+00:00
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
2019-08-01T04:15:18.283173+00:00
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
2019-08-01T04:15:34.460247+00:00
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
2019-08-01T04:15:38.364843+00:00
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
JIT: pid 3924 requesting full stop
2019-08-01T06:07:08.412371+00:00
Warning: VKTM detected a forward time drift. 
Please see the VKTM trace file for more details:
/opt/oracle/diag/rdbms/orcl/orcl/trace/orcl_vktm_2119.trc
Stopping container.
SIGTERM received, shutting down database!
ORACLE_SID: orcl
ORACLE_PDB: ORCLPDB1
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: password
ORACLE_CDB: false
ORACLE_PDB_NUM: 0
ORACLE_MEM: 4000
2019-09-08T23:49:57.944354400Z 
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 08-SEP-2019 23:49:57
2019-09-08T23:49:57.944456100Z 
Copyright (c) 1991, 2019, Oracle.  All rights reserved.
2019-09-08T23:49:57.944498300Z 
Starting /opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...
2019-09-08T23:49:59.635241300Z 
TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/56099cd8ad74/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
2019-09-08T23:49:59.915542400Z 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                08-SEP-2019 23:49:59
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/56099cd8ad74/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
[WARNING] [DBT-10328] Specified GDB Name (orcl) may have a potential conflict with an already existing database on the system.
   ACTION: Specify a different GDB Name that does not conflict with existing databases on the system.
[FATAL] [DBT-10317] Specified SID Name (orcl) already exists.
   ACTION: Specify a different SID Name that does not already exist.
[ 2019-08-01 03:10:05.746 UTC ] [WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
[ 2019-08-01 03:10:05.746 UTC ] [WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
[ 2019-08-01 03:10:27.598 UTC ] Prepare for db operation
DBCA_PROGRESS : 10%
[ 2019-08-01 03:10:27.717 UTC ] Copying database files
DBCA_PROGRESS : 40%
[ 2019-08-01 03:11:51.402 UTC ] Creating and starting Oracle instance
DBCA_PROGRESS : 42%
DBCA_PROGRESS : 46%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 54%
DBCA_PROGRESS : 60%
[ 2019-08-01 03:15:41.722 UTC ] Completing Database Creation
DBCA_PROGRESS : 66%
DBCA_PROGRESS : 70%
[ 2019-08-01 03:18:06.091 UTC ] Executing Post Configuration Actions
DBCA_PROGRESS : 100%
[ 2019-08-01 03:18:06.092 UTC ] Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/orcl.
Database Information:
Global Database Name:orcl
System Identifier(SID):orcl
2019-09-08T23:50:09.298739700Z 
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Sep 8 23:50:09 2019
Version 19.3.0.0.0
2019-09-08T23:50:09.298866400Z 
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
2019-09-08T23:50:09.298922600Z 
Connected to an idle instance.
2019-09-08T23:50:10.728515300Z 
SQL>    ALTER SYSTEM SET control_files='/opt/oracle/oradata/orcl/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
2019-09-08T23:50:10.731639500Z 
2019-09-08T23:50:10.731662100Z 
SQL>    ALTER SYSTEM SET local_listener=''
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
2019-09-08T23:50:10.732491100Z 
2019-09-08T23:50:10.732511100Z 
SQL>    ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
2019-09-08T23:50:10.733408900Z 
2019-09-08T23:50:10.733427400Z 
SQL> BEGIN DBMS_XDB_CONFIG.SETGLOBALPORTENABLED (TRUE); END;
2019-09-08T23:50:10.734147100Z 
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
2019-09-08T23:50:10.734318100Z 
2019-09-08T23:50:10.734345200Z 
SQL> Disconnected
mv: cannot stat '/opt/oracle/product/19c/dbhome_1/dbs/spfileorcl.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/19c/dbhome_1/dbs/orapworcl': No such file or directory
The Oracle base remains unchanged with value /opt/oracle
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################

Getting following error on M1 Mackbook

zainzafar@Zains-MacBook-Pro dockerfiles % sudo ./buildContainerImage.sh -v 19.3.0 -e
Checking Docker version.
Checking if required packages are present and valid...
LINUX.X64_193000_db_home.zip: OK

Container runtime info:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.10.0)
compose: Docker Compose (Docker Inc., v2.15.1)
dev: Docker Dev Environments (Docker Inc., v0.0.5)
extension: Manages Docker extensions (Docker Inc., v0.2.17)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.23.0)

Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 20.10.22
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9ba4b250366a5ddde94bb7c9d1def331423aa323
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.15.49-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.841GiB
Name: docker-desktop
ID: S25S:V4DY:OY4B:6RW4:76SW:RNUN:WFCN:SYSG:A3RC:OJJN:SEQJ:DAAT
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false

==========================
Building image 'oracle/database:19.3.0-ee' ...
[+] Building 0.0s (0/1)
[+] Building 0.3s (2/3)
=> [internal] load build definition from Dockerfile 0.0s
[+] Building 0.4s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/oraclelinux:7-slim 0.4s

[internal] load metadata for docker.io/library/oraclelinux:7-slim:


failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: ``

ERROR: Oracle Database container image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the build operation.

FAILED CONNECTION ON INTELLIJ IDEA

Installed my docker Oracle container and it runs successfully. The challenge is connecting it to database tools for query purposes.

Used this command... --name oracle19c
-p 1521:1521
-p 5500:5500
-e ORACLE_PDB=bencon
-e ORACLE_PWD=admin@123
-e INIT_SGA_SIZE=6000
-e INIT_PGA_SIZE=2000
-c 4
-d
oracle/database:19.3.0-ee
...
Screenshot 2024-04-01 at 01 15 12
... What could be wrong?

How to connect to it using SQLPlus in the docker itself?

I created the default docker image with default parameters that you specified. But i have no idea on how to connect to it via sqlplus on a docker image itself:
I tried:
sudo docker exec -ti oracle19c sqlplus /nolog

then I got:
SQL*Plus: Release 19.0.0.0.0 - Production on Sat May 7 12:27:29 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

SQL>

Then I entered:
connect sys as sysdba

And I got this error:
ORA-12162: TNS:net service name is incorrectly specified

What can I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.