lag-linaro commented on a change in pull request #84: Support multi-arch image building for couchdb docker image URL: https://github.com/apache/couchdb-docker/pull/84#discussion_r223993121
########## File path: 1.7.1/Dockerfile.crossbuild ########## @@ -0,0 +1,124 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +FROM BASEIMAGE +MAINTAINER CouchDB Developers [email protected] + +CROSS_BUILD_COPY qemu-ARCH-static /usr/bin/ + +# Install instructions from https://cwiki.apache.org/confluence/display/COUCHDB/Debian + +RUN groupadd -g 5984 -r couchdb && useradd -u 5984 -d /opt/couchdb -g couchdb couchdb + +RUN apt-get update -y && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + erlang-nox \ + libicu52 \ + libmozjs185-1.0 \ + libnspr4 \ + libnspr4-0d \ + && rm -rf /var/lib/apt/lists/* + +ENV GOSU_VERSION 1.10 +ENV TINI_VERSION 0.16.1 +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 --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; \ + gosu nobody true; \ + \ +# 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 --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; \ + \ + apt-get purge -y --auto-remove wget + +# https://www.apache.org/dist/couchdb/KEYS +ENV GPG_KEYS \ + 15DD4F3B8AACA54740EB78C7B7B7C53943ECCEE1 \ + 1CFBFA43C19B6DF4A0CA3934669C02FFDF3CEBA3 \ + 25BBBAC113C1BFD5AA594A4C9F96B92930380381 \ + 4BFCA2B99BADC6F9F105BEC9C5E32E2D6B065BFB \ + 5D680346FAA3E51B29DBCB681015F68F9DA248BC \ + 7BCCEB868313DDA925DF1805ECA5BCB7BB9656B0 \ + C3F4DFAEAD621E1C94523AEEC376457E61D50B88 \ + D2B17F9DA23C0A10991AF2E3D9EE01E47852AEE4 \ + E0AF0A194D55C84E4A19A801CDB0C0F904F4EE9B +RUN set -xe \ + && for key in $GPG_KEYS; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done + +ENV COUCHDB_VERSION 1.7.1 + +# download dependencies, compile and install couchdb, +# set correct permissions, expose couchdb to the outside and disable logging to disk +RUN buildDeps=' \ + gcc \ + g++ \ + erlang-dev \ + libcurl4-openssl-dev \ + libicu-dev \ + libmozjs185-dev \ Review comment: As above. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
