Merge pull request #281 from sebras/master
[jackhill/mal.git] / plsql / Dockerfile
CommitLineData
2866f9a8
JM
1FROM wnameless/oracle-xe-11g
2
3RUN apt-get -y update
4RUN apt-get -y install make cpp python
5
6RUN apt-get -y install rlwrap
7
8ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
9ENV PATH ${ORACLE_HOME}/bin:${PATH}
10ENV 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.
14RUN /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
ba1649e4
JM
19WORKDIR /mal
20
21# Add oracle user
52edd333 22RUN usermod -a -G sudo oracle
ba1649e4
JM
23
24# Travis runs as user ID 1001 so add that user
25RUN useradd -ou 1001 -m -s /bin/bash -G sudo travis
26
27# Enable oracle and travis users to sudo for oracle startup
28RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
52edd333 29
2866f9a8
JM
30ADD entrypoint.sh /entrypoint.sh
31ENTRYPOINT ["/entrypoint.sh"]
32CMD []
33
34