-
-
Save zopyx/6a7c8b54a77f21d95861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir centos6-ml | |
cd centos6-ml | |
# Download Dockerfile - you might need to update the url | |
curl -k -L -O https://gist.githubusercontent.com/rlouapre/39f3cf793f27895ae8d2/raw/60679c9472bc50c0e72e920eb80dfca066d99463/Dockerfile | |
# Download supervisord.conf - you might need to update the url | |
curl -k -L -O https://gist.githubusercontent.com/rlouapre/39f3cf793f27895ae8d2/raw/cbfbe33c5c5bf23734852560640ffa68cbebeb50/supervisord.conf | |
# Download locally MarkLogic-7.0-4.x86_64.rpm | |
... | |
# Builder docker image | |
docker build --rm=true -t "rlouapre/centos6-ml" . | |
# Run docker image - export port 8000, 8001, 8002 for ML 2022 for ssh (pwd 123456) | |
docket run -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 2022:2022 rlouapre/centos6-ml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos6 | |
MAINTAINER Richard Louapre <[email protected]> | |
#update yum repository and install openssh server | |
RUN yum update -y | |
RUN yum install -y openssh-server | |
#generate ssh key | |
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key | |
RUN ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key | |
RUN sed -ri 's/session required pam_loginuid.so/#session required pam_loginuid.so/g' /etc/pam.d/sshd | |
RUN mkdir -p /root/.ssh && chown root.root /root && chmod 700 /root/.ssh | |
#change root password to 123456 | |
RUN echo 'root:123456' | chpasswd | |
WORKDIR /tmp | |
ADD MarkLogic-7.0-4.x86_64.rpm /tmp/MarkLogic-7.0-4.x86_64.rpm | |
# RUN curl -k -L -O https://www.dropbox.com/s/f4107q87gub1rcm/MarkLogic-7.0-4.x86_64.rpm?dl=0 | |
# RUN mv MarkLogic-7.0-4.x86_64.rpm?dl=0 MarkLogic-7.0-4.x86_64.rpm | |
RUN yum -y install /tmp/MarkLogic-7.0-4.x86_64.rpm | |
RUN rm /tmp/MarkLogic-7.0-4.x86_64.rpm | |
# Setup supervisor | |
ADD https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py /tmp/ez_setup.py | |
RUN python /tmp/ez_setup.py | |
RUN easy_install supervisor | |
ADD supervisord.conf /etc/supervisord.conf | |
WORKDIR / | |
# Expose MarkLogic admin | |
EXPOSE 2022 8000 8001 8002 | |
# Run Supervisor | |
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[supervisord] | |
nodaemon=true | |
[program:sshd] | |
command=/usr/sbin/sshd -D -p 2022 | |
autorestart=true | |
[program:marklogic] | |
; pidproxy should does not seem to be working with MarkLogic process | |
;command=/usr/bin/pidproxy /var/run/MarkLogic.pid /etc/rc.d/init.d/MarkLogic start | |
command=/bin/bash -c "/etc/rc.d/init.d/MarkLogic start && tail -F /var/opt/MarkLogic/Logs/ErrorLog.txt" | |
redirect_stderr=true | |
autorestart=true | |
startsecs=30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment