This is an automated email from the ASF dual-hosted git repository. mhamann pushed a commit to branch build-fixes in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-apigateway.git
commit f0fd154b5405bf6f8a477303426f65417e6c58be Author: Matt Hamann <mham...@us.ibm.com> AuthorDate: Wed Mar 6 23:50:57 2019 -0500 Fix builds post Alpine 3.9 --- .profiling.after | 2 +- .profiling.before | 4 +++- Dockerfile | 10 ++++++---- build_profiling.sh | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.profiling.after b/.profiling.after index a078925..5d5060c 100644 --- a/.profiling.after +++ b/.profiling.after @@ -1,6 +1,6 @@ COPY ./api-gateway.conf.profiling /etc/api-gateway/api-gateway.conf RUN apt-get install -y git && mkdir -p /profiling && git clone https://github.com/openresty/stapxx.git && cd stapxx && git clone https://github.com/brendangregg/FlameGraph.git && apt-get remove -y git -RUN apt-get install -y linux-headers-`uname -r` kbuild gcc +RUN apt-get install -y linux-headers-$(uname -r) kbuild gcc ENV LD_LIBRARY_PATH /usr/local/lib WORKDIR /tmp/stapxx ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] diff --git a/.profiling.before b/.profiling.before index a17091d..9179931 100644 --- a/.profiling.before +++ b/.profiling.before @@ -1,6 +1,8 @@ FROM ubuntu:latest -RUN apt-get update && apt-get install -y gcc make g++ gettext git python zlib1g-dev bzip2 wget m4 git +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && \ + apt-get install -y gcc make g++ gettext git python zlib1g-dev bzip2 wget m4 git libjemalloc1 libjemalloc-dev WORKDIR /tmp RUN wget https://sourceware.org/elfutils/ftp/0.168/elfutils-0.168.tar.bz2 && tar -jxf elfutils-0.168.tar.bz2 && cd elfutils-0.168 && ./configure && make -j4 && make install diff --git a/Dockerfile b/Dockerfile index 587a61d..adc6d6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,11 +21,13 @@ # # From https://hub.docker.com/_/alpine/ # -FROM alpine:latest + +FROM alpine:3.9 # install dependencies -RUN apk --update add \ - gcc tar libtool zlib jemalloc jemalloc-dev perl tzdata \ +RUN apk --update && \ + apk add \ + gcc tar libtool zlib perl tzdata \ ca-certificates wget make musl-dev openssl-dev openssl pcre-dev g++ zlib-dev curl python \ perl-test-longstring perl-list-moreutils perl-http-message geoip-dev dumb-init jq \ && update-ca-certificates \ @@ -215,7 +217,7 @@ RUN echo " ... installing neturl.lua ... " \ && rm -rf /tmp/api-gateway RUN echo " ... installing cjose ... " \ - && apk update && apk add automake autoconf git gcc make jansson jansson-dev \ + && apk add automake autoconf git gcc make jansson jansson-dev \ && mkdir -p /tmp/api-gateway \ && curl -L -k https://github.com/cisco/cjose/archive/${CJOSE_VERSION}.tar.gz -o /tmp/api-gateway/cjose-${CJOSE_VERSION}.tar.gz \ && tar -xf /tmp/api-gateway/cjose-${CJOSE_VERSION}.tar.gz -C /tmp/api-gateway/ \ diff --git a/build_profiling.sh b/build_profiling.sh index 088f18d..3c9b7b2 100755 --- a/build_profiling.sh +++ b/build_profiling.sh @@ -19,7 +19,7 @@ cp Dockerfile Dockerfile.profiling sed -i -e 's/FROM\ alpine.*//g' "Dockerfile.profiling" -sed -i -e 's/apk\ update/apt-get\ update/g' "Dockerfile.profiling" +sed -i -e 's/apk\ --update/apt-get\ update/g' "Dockerfile.profiling" sed -i -e 's/apk\ add/apt-get\ install\ -y/g' "Dockerfile.profiling" sed -i -e 's/apk\ del/apt-get\ remove\ -y/g' "Dockerfile.profiling" sed -i -e 's/pcre-dev/libpcre2-dev/g' "Dockerfile.profiling" @@ -32,8 +32,9 @@ sed -i -e 's/geoip-dev/libgeoip-dev/g' "Dockerfile.profiling" sed -i -e 's/jemalloc/libjemalloc1/g' "Dockerfile.profiling" sed -i -e 's/libjemalloc1-dev/libjemalloc-dev/g' "Dockerfile.profiling" sed -i -e 's/openssl-dev/libssl-dev/g' "Dockerfile.profiling" +sed -i -e 's/jansson\ /libjansson4\ /g' "Dockerfile.profiling" +sed -i -e 's/jansson-dev/libjansson-dev/g' "Dockerfile.profiling" sed -i -e 's/--with-debug/--with-debug\ --with-dtrace-probes/g' "Dockerfile.profiling" -sed -i -e 's/OPENRESTY_VERSION=.*\ /OPENRESTY_VERSION=1.11.2.2\ /g' "Dockerfile.profiling" sed -i -e 's/adduser\ -S.*/useradd\ nginx-api-gateway/g' "Dockerfile.profiling" sed -i -e 's/&&\ addgroup.*//g' "Dockerfile.profiling" sed -i -e 's/ENTRYPOINT.*//g' "Dockerfile.profiling"