Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
72 lines (59 sloc)
2.75 KB
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
# Pull base image. | |
FROM phusion/baseimage:0.9.9 | |
# Set correct environment variables. | |
ENV HOME /root | |
# Regenerate SSH host keys. baseimage-docker does not contain any, so you | |
# have to do that yourself. You may also comment out this instruction; the | |
# init system will auto-generate one during boot. | |
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh | |
# Use baseimage-docker's init system. | |
CMD ["/sbin/my_init"] | |
# Install Java | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes software-properties-common python-software-properties | |
RUN add-apt-repository -y ppa:webupd8team/java | |
RUN apt-get update | |
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
RUN apt-get install -y oracle-java7-installer | |
# Install confluence | |
RUN wget -O /tmp/confluence.bin http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.4.4-x64.bin | |
RUN chmod u+x /tmp/confluence.bin | |
ADD response.varfile /tmp/response.varfile | |
RUN /tmp/confluence.bin -q -varfile /tmp/response.varfile | |
VOLUME ["/var/atlassian/application-data/confluence"] | |
EXPOSE 8090 | |
# Ensure UTF-8 | |
RUN apt-get update | |
RUN locale-gen en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
ENV LC_ALL en_US.UTF-8 | |
# Install the latest postgresql | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" > /etc/apt/sources.list.d/pgdg.list &&\ | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ | |
apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 && \ | |
/etc/init.d/postgresql stop | |
# Install other tools. | |
RUN DEBIAN_FRONTEND=noninteractive && \ | |
apt-get install -y pwgen inotify-tools | |
# Decouple our data from our container. | |
VOLUME ["/var/data/postgresql"] | |
# Cofigure the database to use our data dir. | |
RUN sed -i -e"s/data_directory =.*$/data_directory = '\/var\/data\/postgresql'/" /etc/postgresql/9.3/main/postgresql.conf | |
# Allow connections from anywhere. | |
RUN sed -i -e"s/^#listen_addresses =.*$/listen_addresses = '*'/" /etc/postgresql/9.3/main/postgresql.conf | |
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf | |
EXPOSE 5432 | |
ADD scripts /scripts | |
RUN chmod +x /scripts/start*.sh | |
RUN touch /firstrun | |
# Clean up APT when done. | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
RUN cp -f /scripts/start.sh /etc/my_init.d | |
# add all the authorisation key from the machine where the build is done | |
RUN mkdir -p /root/.ssh | |
ADD my_keys /tmp/my_keys | |
RUN cat /tmp/my_keys >> /root/.ssh/authorized_keys && rm -f /tmp/my_keys | |
RUN chmod 700 /root/.ssh | |
RUN chmod 600 /root/.ssh/authorized_keys |