How to add couchdb server to docker creation file

I have a docker file, for example:

FROM ubuntu:12.04
MAINTAINER me <me@c.com>

RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install supervisor \
apache2 \
mysql-server \
php5 \
libapache2-mod-php5 \
php5-mysql \
php5-mcrypt

#ssh
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:root' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
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

EXPOSE 22 80
ADD ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"]

My question is: how to add couchdb server to this docker file?

I can get the embedded image of the couchdb docker from here: https://hub.docker.com/r/klaemo/couchdb/ , but how do I create an image like this myself? I can not find any documentation regarding the process!

I spent 3 hours trying to figure out Google, but I’m out of luck, so I’d risk asking, even if it’s a dump!

0
source share
1 answer

couchdb, ? , Ubuntu 12.04 , couchdb 1.0.1 Ubuntu 12.04/ [] , couchdb apt-get :

FROM ubuntu:12.04
MAINTAINER me <me@c.com>

RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install supervisor \
apache2 \
mysql-server \
php5 \
libapache2-mod-php5 \
php5-mysql \
php5-mcrypt \
couchdb
#[--Rest of your dockerfile goes here unchanged--]

PPA, Apache CouchDB, tar . docker:

# To install the ppa finder tool in your docker container
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python-software-properties
RUN add-apt-repository ppa:couchdb/stable -y
RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install supervisor \
apache2 \
mysql-server \
php5 \
libapache2-mod-php5 \
php5-mysql \
php5-mcrypt \
couchdb
#[--Rest of your dockerfile goes here unchanged--]

couchdb , couchdb . , (g++ erlang-dev erlang-manpages erlang-base-hipe erlang-eunit, libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool) , couchdb . / , couchdb. couchdb build wiki apache. , dockerfile . dockerfile [UNTESTED] :

FROM ubuntu:12.04
MAINTAINER me <me@c.com>
ENV COUCHDB_VERSION master
RUN groupadd -r couchdb && useradd -d /usr/src/couchdb -g couchdb couchdb
# download dependencies 
RUN apt-get update -y -qq && apt-get install -y --no-install-recommends \
build-essential \
erlang-dev \
erlang-manpages \
erlang-base-hipe \
erlang-eunit \
erlang-nox \
erlang-xmerl \
erlang-inets \
libmozjs185-dev \
libicu-dev \
libcurl4-gnutls-dev \
libtool
RUN cd /usr/src && git clone https://git-wip-us.apache.org/repos/asf/couchdb.git \ 
&& cd couchdb && git checkout $COUCHDB_VERSION \ 
&& cd /usr/src/couchdb && ./configure && make
# You can optionally purge/remove the packages you installed to build the couchdb from source.
# permissions
RUN chmod +x /usr/src/couchdb/dev/run && chown -R couchdb:couchdb /usr/src/couchdb
USER couchdb 
EXPOSE 5984 15984 25984 35984 15986 25986 35986
#[--Rest of your dockerfile can go here as required--]
0

All Articles