You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/05/03 16:40:35 UTC

[GitHub] [couchdb-docker] pavellzubkov opened a new issue #173: Multiarch Couchdb3 image

pavellzubkov opened a new issue #173:
URL: https://github.com/apache/couchdb-docker/issues/173


   I try to build multiarch image, but get error:
   
   ```
   > 55 3.553 =ERROR REPORT==== 3-May-2020::16:29:59 ===
   > #55 3.553 Loading of /couchdb/bin/rebar/rebar/ebin/rebar.beam failed: badfile
   ```
   
   My dockerfile success build 2.3.1 version, but don't work with 3.0.0. May be some secret step exist?)
   Dockerfile:
   
   ```
   FROM ubuntu:xenial
   
   # Add CouchDB user account
   RUN groupadd -r couchdb && useradd -d /opt/couchdb -g couchdb couchdb
   RUN apt update
   RUN apt-get install -y apt-transport-https gnupg ca-certificates
   
   # Update GOSU to 1.11 and Tini to 0.18.0
   ENV GOSU_VERSION 1.11
   ENV TINI_VERSION 0.18.0
   RUN set -ex; \
       \
       apt-get update; \
       apt-get install -y --no-install-recommends wget; \
       rm -rf /var/lib/apt/lists/*; \
       \
       dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
       \
       # install gosu
       wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$dpkgArch"; \
       wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
       export GNUPGHOME="$(mktemp -d)"; \
       gpg --no-tty --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
       gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
       rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
       chmod +x /usr/local/bin/gosu; \
       \
       # check if tini exists
       if ! type "tini" > /dev/null; then \
       \
       # if not then install tini
       wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-$dpkgArch"; \
       wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-$dpkgArch.asc"; \
       export GNUPGHOME="$(mktemp -d)"; \
       gpg --no-tty --keyserver ha.pool.sks-keyservers.net --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7; \
       gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
       rm -r "$GNUPGHOME" /usr/local/bin/tini.asc; \
       chmod +x /usr/local/bin/tini; \
       tini --version; \
       \
       fi; 
   
   RUN apt-get update && apt-get --no-install-recommends -y install \
       build-essential \
       pkg-config \
       erlang \
       libicu-dev \
       libmozjs185-dev \
       libcurl4-openssl-dev
   
   # RUN apt-get update
   ENV COUCHDB_VERSION 3.0.0
   
   # Acquire CouchDB source code
   RUN cd /usr/src
   RUN mkdir couchdb
   RUN wget -O couchdb.tar.gz https://dist.apache.org/repos/dist/release/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz
   RUN tar -xzf couchdb.tar.gz -C couchdb --strip-components=1 
   
   RUN cd couchdb && ./configure \
       && make release \
       && mv rel/couchdb /opt/ 
   
   # Cleanup build detritus
   # RUN apt-get purge -y --auto-remove $buildDeps \
   RUN rm -rf /var/lib/apt/lists/* /usr/src/couchdb* 
   RUN mkdir /opt/couchdb/data 
   RUN chown -R couchdb:couchdb /opt/couchdb
   
   
   COPY local.ini /opt/couchdb/etc/default.d/
   COPY vm.args /opt/couchdb/etc/
   
   COPY ./docker-entrypoint.sh /
   
   # Setup directories and permissions
   RUN chown -R couchdb:couchdb /opt/couchdb/etc/default.d/ /opt/couchdb/etc/vm.args
   
   WORKDIR /opt/couchdb
   EXPOSE 5984 4369 9100
   VOLUME ["/opt/couchdb/data"]
   
   ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
   CMD ["/opt/couchdb/bin/couchdb"]
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali commented on issue #173: Multiarch Couchdb3 image

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #173:
URL: https://github.com/apache/couchdb-docker/issues/173#issuecomment-623163191


   The version of Erlang you are running in Xenial is too old for CouchDB. CouchDB 3.0.0 requires a minimum of CouchDB 20.3.8.11.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org