blob: 0565df5b03fe67c48febd0f9630575b8a3ec3514 [file] [log] [blame]
FROM klaemo/couchdb-base
MAINTAINER Clemens Stolle klaemo@fastmail.fm
# Get the source
RUN cd /opt && \
wget http://apache.openmirror.de/couchdb/source/1.5.1/apache-couchdb-1.5.1.tar.gz && \
tar xzf /opt/apache-couchdb-1.5.1.tar.gz
# build couchdb
RUN cd /opt/apache-couchdb-* && ./configure && make && make install
# install github.com/visionmedia/mon v1.2.3
RUN (mkdir /tmp/mon && cd /tmp/mon && curl -L# https://github.com/visionmedia/mon/archive/1.2.3.tar.gz | tar zx --strip 1 && make install)
# cleanup
RUN apt-get remove -y build-essential wget curl && \
apt-get autoremove -y && apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /opt/apache-couchdb-*
ADD ./opt /opt
# Configuration
RUN sed -e 's/^bind_address = .*$/bind_address = 0.0.0.0/' -i /usr/local/etc/couchdb/default.ini
RUN /opt/couchdb-config
# Define mountable directories.
VOLUME ["/usr/local/var/log/couchdb", "/usr/local/var/lib/couchdb", "/usr/local/etc/couchdb"]
ENTRYPOINT ["/opt/start_couch"]
EXPOSE 5984