Last active
January 2, 2016 04:28
-
-
Save toffer/8250285 to your computer and use it in GitHub Desktop.
Dockerfile for Devbox
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
# Dockerfile for Devbox | |
FROM racker/precise-with-updates:latest | |
MAINTAINER Tom Offermann <tom@offermann.us> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise-updates main universe" >> /etc/apt/sources.list | |
RUN echo "deb http://security.ubuntu.com/ubuntu precise-security main universe" >> /etc/apt/sources.list | |
RUN apt-get update && \ | |
apt-get -y upgrade | |
# Fix locales | |
RUN locale-gen en_US en_US.UTF-8 && \ | |
update-locale LC_ALL=en_US.UTF-8 | |
# Install sshd | |
RUN apt-get -y install openssh-server && \ | |
mkdir -p -m0755 /var/run/sshd | |
# Install necessary packages | |
RUN apt-get -y install vim curl iputils-ping man-db less | |
# Add vagrant user | |
RUN adduser vagrant && \ | |
echo 'vagrant:password' | chpasswd | |
# Allow vagrant user to sudo | |
RUN apt-get install sudo && \ | |
groupadd admin && \ | |
usermod -a -G admin vagrant && \ | |
sed -i '/^%admin/ c %admin ALL=(ALL) NOPASSWD: ALL' /etc/sudoers | |
# Add vagrant's "insecure public key" | |
ADD keys/vagrant_rsa.pub /home/vagrant/.ssh/authorized_keys | |
RUN chown -R vagrant:vagrant /home/vagrant/.ssh && \ | |
chmod 0700 /home/vagrant/.ssh && \ | |
chmod 0600 /home/vagrant/.ssh/authorized_keys | |
EXPOSE 22 | |
ENTRYPOINT ["/usr/sbin/sshd"] | |
CMD ["-D"] |
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
# Dockerfile for readthedocs dev box | |
# ID for "devbox" | |
FROM devbox | |
RUN apt-get update && \ | |
apt-get -y install \ | |
vim screen software-properties-common python-pip python-setuptools \ | |
nginx redis-server git-core python-dev libpq-dev libxml2-dev libxslt-dev && \ | |
pip install -U pip | |
RUN mkdir /home/vagrant/checkouts && \ | |
mkdir /home/vagrant/etc && \ | |
mkdir /home/vagrant/run && \ | |
mkdir /home/vagrant/log && \ | |
chown -R vagrant:vagrant /home/vagrant | |
RUN cd /home/vagrant/checkouts && git clone git://github.com/rtfd/readthedocs.org.git && \ | |
CFLAGS="-O0" pip install -U lxml==3.0.2 && \ | |
pip install -U -r /home/vagrant/checkouts/readthedocs.org/deploy_requirements.txt | |
ADD config/nginx.conf /etc/nginx/nginx.conf | |
ADD config/lb.nginx.conf /etc/nginx/conf.d/lb.conf | |
ADD config/app.nginx.conf /etc/nginx/conf.d/app.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment