Created
November 25, 2015 10:56
-
-
Save vmwarecode/b880b6a61b7582442ff8 to your computer and use it in GitHub Desktop.
Docker image to run pyvmomi
This file contains 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 ubuntu:trusty | |
MAINTAINER Lino Telera Linoproject.net <[email protected]> | |
# Install base packages | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | |
python \ | |
python-pip python-dev build-essential \ | |
openssh-server | |
RUN pip install --upgrade pip | |
RUN pip install --upgrade virtualenv | |
## SSL python connectons | |
RUN pip install requests[security] | |
RUN pip install pyopenssl ndg-httpsclient pyasn1 | |
## SSH settings | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:screencast' | 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 | |
## Working directory | |
RUN mkdir /opt/pythoncode | |
EXPOSE 22 | |
WORKDIR /opt/pythoncode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment