Public Repository

Last pushed: 2 years ago
Short Description
neocrawler docker
Full Description
FROM ubuntu:14.04
MAINTAINER Cherokee <successage@gmail.com>

RUN echo > /etc/apt/sources.list

#ubuntu source from 163.com
RUN echo 'deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse' > /etc/apt/sources.list
RUN echo 'deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse' >> /etc/apt/sources.list
RUN echo 'deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list

RUN apt-get update && apt-get install -y vim openssh-server supervisor git
RUN mkdir /var/run/sshd
RUN echo 'root:123' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

#RUN echo "neocrawler" > /etc/hostname
#RUN hostname neocrawler

# Define mountable directories.
#VOLUME ["/data/app"]
#VOLUME ["/data/db"]
RUN mkdir -p /data/app/mongodb
RUN mkdir -p /data/app/redis
RUN mkdir -p /data/app/nodejs
RUN mkdir -p /data/db/mongodb

# Define working directory.
WORKDIR /data/app

COPY mongodb /data/app/mongodb
COPY redis /data/app/redis
COPY nodejs /data/app/nodejs
RUN git clone https://git.oschina.net/dreamidea/neocrawler.git && cd neocrawler && git checkout stage && /data/app/nodejs/bin/npm install

#RUN wget --no-verbose -O /data/app/mongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-3.2.1.tgz 
#RUN tar -zxvf mongodb.tgz -C mongodb
#RUN echo "export PATH=/data/app/mongodb/bin:$PATH" >> /root/.bashrc

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

EXPOSE 22 9001 2013 27017 6379
CMD ["/usr/bin/supervisord"]
Docker Pull Command
Owner
successage