RUN dpkg-divert --local --rename --add /etc/init.d/mongod RUN ln -s /bin/true /etc/init.d/mongod
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
RUN echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
#Install packages RUN apt-get update RUN apt-get install -y openssh-server supervisor redis-server mongodb-org
# Create the MongoDB data directory RUN mkdir -p /data/db RUN mkdir /var/run/supervisor
#SSH RUN mkdir /var/run/sshd #修改密码 RUN echo 'root:admin' | chpasswd
RUN mkdir -p /var/run/sshd && sed -i "s/PermitRootLogin.*/PermitRootLogin yes/g" /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