Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (59 sloc) 2.75 KB
# 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/
# 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
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"]
# Ensure UTF-8
RUN apt-get update
RUN locale-gen en_US.UTF-8
# Install the latest postgresql
RUN echo "deb precise universe" > /etc/apt/sources.list.d/pgdg.list &&\
echo "deb 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 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
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/ /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
You can’t perform that action at this time.