Created
July 26, 2016 10:06
-
-
Save michael-simons/7f267a24086a9e3a8a7f8ed8fb79c634 to your computer and use it in GitHub Desktop.
Feedback for Bruno and Gerald
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 is create_tablespace_and_user.sql | |
-- Change to PDB which was created inside parent iamge | |
ALTER SESSION SET CONTAINER = ORCLPDB1; | |
-- Enable Enterprise Manager Express on port 5501 | |
EXEC dbms_xdb_config.sethttpsport(5501); | |
-- Create table space for demo application | |
CREATE SMALLFILE TABLESPACE "DOAG2016" | |
DATAFILE 'doag2016-1' SIZE 512M AUTOEXTEND ON NEXT 128M MAXSIZE 1024M | |
LOGGING | |
DEFAULT NOCOMPRESS | |
ONLINE | |
EXTENT MANAGEMENT LOCAL AUTOALLOCATE | |
SEGMENT SPACE MANAGEMENT AUTO; | |
-- Create doag2016 user | |
CREATE USER doag2016 IDENTIFIED BY doag2016 PROFILE "DEFAULT" ACCOUNT UNLOCK DEFAULT TABLESPACE "DOAG2016" TEMPORARY TABLESPACE "TEMP"; | |
GRANT "CONNECT" TO doag2016; | |
GRANT "DBA" TO doag2016; | |
---- | |
# And the docker file: | |
# Use https://github.com/oracle/docker-images/tree/master/OracleDatabase | |
# to create an oracle/database:12.1.0.2-ee image | |
FROM oracle/database:12.1.0.2-ee | |
MAINTAINER Michael J. Simons <michael@simons.ac> | |
ADD create_tablespace_and_user.sql /var/tmp/create_tablespace_and_user.sql | |
RUN echo "startup;" | sqlplus / as sysdba && \ | |
sqlplus / as sysdba @/var/tmp/create_tablespace_and_user.sql | |
EXPOSE 1521 5500 5501 | |
CMD $ORACLE_BASE/runOracle.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment