FROM oraclelinux:7.2 # Update the operating system RUN ["yum", "-y", "update"] # Add the oracle YUM public repositories ADD ["http://public-yum.oracle.com/public-yum-ol7.repo", "/etc/yum.repos.d/"] # Download and import the gpg key ADD ["http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7", "/etc/yum.repos.d/"] RUN ["rpm", "--import", "/etc/yum.repos.d/RPM-GPG-KEY-oracle-ol7"] # Install necessary packages RUN ["yum", "-y", "install", "oracle-rdbms-server-12cR1-preinstall"] # Clean the yum cache RUN ["yum", "clean", "all"] # Add groups for grid infrastructure RUN ["groupadd", "--gid", "54421", "asmdba"] RUN ["groupadd", "--gid", "54422", "asmadmin"] # Add groups to database home owner RUN ["usermod", "--append", "--groups", "asmdba", "oracle"] # Set the passwords RUN sh -c "echo 'oracle:oracle' | chpasswd" RUN sh -c "echo 'root:oracle' | chpasswd" # Assign the correct owner to the ASM disk ADD ["99-asm-disks.rules", "/etc/udev/rules.d/"] # Create installation root directory RUN ["mkdir", "-p", "/u01"] RUN ["chgrp", "oinstall", "/u01"] RUN ["chmod", "0775", "/u01"] # Allow non-privileged users the ability to execute the ping command RUN ["chmod", "4755", "/bin/ping"] # SELinux bug fix RUN ["mkdir", "-p", "/etc/selinux/targeted/contexts/"] ADD ["dbus_contexts", "/etc/selinux/targeted/contexts/"] # Hide/disable the ttyS0 serial console service RUN ["systemctl", "mask", "serial-getty@ttyS0.service"]