Skip to content

Commit ff82e54

Browse files
author
Spencer Rinehart
committed
Set environment variables using ENV rather than bashrc.
This method of setting environment variables should be more reliable. Docker will set them even when you override the command to execute and try to execute something other than a bash shell (e.g., sqlplus).
1 parent ea9033a commit ff82e54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ RUN mv /initXETemp.ora /u01/app/oracle/product/11.2.0/xe/config/scripts
1919

2020
RUN printf 8080\\n1521\\noracle\\noracle\\ny\\n | /etc/init.d/oracle-xe configure
2121

22-
RUN echo 'export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe' >> /etc/bash.bashrc
23-
RUN echo 'export PATH=$ORACLE_HOME/bin:$PATH' >> /etc/bash.bashrc
24-
RUN echo 'export ORACLE_SID=XE' >> /etc/bash.bashrc
22+
ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
23+
ENV PATH /u01/app/oracle/product/11.2.0/xe/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
24+
ENV ORACLE_SID XE
2525

2626
EXPOSE 22
2727
EXPOSE 1521

0 commit comments

Comments
 (0)