Added SSH support

this will add ssh support and default root password (for development purposes).
This commit is contained in:
AlSayed Gamal 2015-06-17 18:01:44 +03:00
parent 0afa334549
commit 30b85510a5

View File

@ -15,10 +15,18 @@ RUN set -x; \
&& ln -s /usr/bin/nodejs /usr/bin/node \ && ln -s /usr/bin/nodejs /usr/bin/node \
&& curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \ && curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \
&& echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \ && echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \
&& dpkg --force-depends -i wkhtmltox.deb \
&& apt-get -y install -f --no-install-recommends \ && apt-get -y install -f --no-install-recommends \
&& dpkg --force-depends -i wkhtmltox.deb \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
#add ssh
RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:odoo' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
# Install Odoo # Install Odoo
ENV ODOO_VERSION 8.0 ENV ODOO_VERSION 8.0