Merge pull request #345 from asarhaddon/ada.2
[jackhill/mal.git] / plsql / Dockerfile
1 FROM wnameless/oracle-xe-11g
2
3 RUN apt-get -y update
4 RUN apt-get -y install make cpp python
5
6 RUN apt-get -y install rlwrap
7
8 ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
9 ENV PATH ${ORACLE_HOME}/bin:${PATH}
10 ENV ORACLE_SID=XE
11
12 # Enable use of DMBS_LOCK.sleep and make sure there are no password
13 # expiry messages that may interfere with communication.
14 RUN /usr/sbin/startup.sh && \
15 echo "GRANT EXECUTE ON DBMS_LOCK TO system;" | sqlplus -S sys/oracle AS sysdba && \
16 echo "ALTER PROFILE default LIMIT PASSWORD_LIFE_TIME UNLIMITED;" | sqlplus -S system/oracle && \
17 echo "ALTER USER system IDENTIFIED BY oracle ACCOUNT UNLOCK;" | sqlplus -S system/oracle
18
19 WORKDIR /mal
20
21 # Add oracle user
22 RUN usermod -a -G sudo oracle
23
24 # Travis runs as user ID 1001 so add that user
25 RUN useradd -ou 1001 -m -s /bin/bash -G sudo travis
26
27 # Enable oracle and travis users to sudo for oracle startup
28 RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
29
30 ADD entrypoint.sh /entrypoint.sh
31 ENTRYPOINT ["/entrypoint.sh"]
32 CMD []
33
34