Skip to content

Instantly share code, notes, and snippets.

@carlgrundberg
Created November 24, 2014 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlgrundberg/5fd220ed62004796ff0a to your computer and use it in GitHub Desktop.
Save carlgrundberg/5fd220ed62004796ff0a to your computer and use it in GitHub Desktop.
Docker config for LEP-enviorment. Ubuntu + Nginx + PHP
FROM ubuntu:14.04
MAINTAINER Menmo <teknik@menmo.se>
# Keep upstart from complaining
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install curl
# nginx from nginx.org to get newer version than available in
RUN echo "deb http://nginx.org/packages/ubuntu/ lucid nginx" >> /etc/apt/sources.list
RUN echo "deb-src http://nginx.org/packages/ubuntu/ lucid nginx" >> /etc/apt/sources.list
RUN curl -O http://nginx.org/keys/nginx_signing.key
RUN apt-key add nginx_signing.key
# Basic Requirements
RUN apt-get -y install nginx php5-fpm php5-mysql php5-cli php-apc git pwgen python-setuptools vim locate
# Setup SSH-access
RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:password' | 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment