# Dockerfile to build rasdaman community container images # Based on CentOS 7 with systemd support FROM picoded/centos-systemd MAINTAINER Dimitar Misev # Install prerequisites RUN yum clean all RUN yum -q -y update RUN yum -q -y install sudo curl wget less vim unzip RUN yum -q -y install openssh-server openssh openssh-clients RUN yum -q -y install epel-release # Patch the sudo configuration, otherwise we get this error: # "sudo: sorry, you must have a tty to run sudo" RUN sed -i '/^Defaults.*requiretty$/d' /etc/sudoers RUN wget http://download.rasdaman.org/installer/install.sh RUN bash install.sh -d ENV INSTALLER_PROFILE /tmp/rasdaman-installer/profiles/installer/default.toml # automate the installation RUN sed -i 's/"user": "rasdaman",/"user": "rasdaman", "auto": true,/' $INSTALLER_PROFILE RUN python /tmp/rasdaman-installer/main.py $INSTALLER_PROFILE || true RUN test -f /etc/profile.d/rasdaman.sh && source /etc/profile.d/rasdaman.sh # Enable on startup RUN systemctl enable sshd.service RUN systemctl enable postgresql.service RUN systemctl enable tomcat.service RUN systemctl enable rasdaman.service RUN chown -R tomcat: /var/lib/tomcat/webapps/secoredb RUN /etc/init.d/rasdaman start # Open ssh EXPOSE 22 # Tomcat (localhost:8080/rasdaman/ows) EXPOSE 8080 # Make sure to adapt the password here RUN echo 'root:root' | chpasswd CMD ["/usr/sbin/init"]