forked from goryszewskig/vagrant-docker-oracle12c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (25 loc) · 1002 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM centos:centos6
MAINTAINER Yasushi YAMAZAKI
# convert into Oracle Linux 6
RUN curl -O https://linux.oracle.com/switch/centos2ol.sh
RUN sh centos2ol.sh; echo success
# fix missing MAKEDEV error
RUN yum install -y MAKEDEV
RUN yum upgrade -y
# fix locale error
RUN yum reinstall -y glibc-common
RUN echo LANG=en_US.utf-8 >> /etc/environment \
&& echo LC_ALL=en_US.utf-8 >> /etc/environment
# add extra packages
RUN yum install -y vim-minimal
RUN yum install -y oracle-rdbms-server-12cR1-preinstall
# create directories
RUN mkdir /opt/oracle /opt/oraInventory /opt/datafile \
&& chown oracle:oinstall -R /opt
# set environment variables
RUN echo "export ORACLE_BASE=/opt/oracle" >> /home/oracle/.bash_profile \
&& echo "export ORACLE_HOME=/opt/oracle/product/12.1.0.2/dbhome_1" >> /home/oracle/.bash_profile \
&& echo "export ORACLE_SID=orcl" >> /home/oracle/.bash_profile \
&& echo "export PATH=\$PATH:\$ORACLE_HOME/bin" >> /home/oracle/.bash_profile
# confirm
RUN cat /etc/oracle-release