Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lws to image build #369

Merged
merged 2 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,28 @@ do_patch () {

WORKING=`pwd`
wget ${PROTON_SOURCE_URL} -O qpid-proton.tar.gz
wget ${LWS_SOURCE_URL} -O libwebsockets.tar.gz

mkdir -p qpid-proton-src build staging proton_build proton_install
mkdir -p qpid-proton-src build staging proton_build proton_install lws-src lws_build lws_install
tar -zxf qpid-proton.tar.gz -C qpid-proton-src --strip-components 1
tar -zxf libwebsockets.tar.gz -C lws-src --strip-components 1

do_patch "patches/proton" qpid-proton-src

cd proton_build
cd $WORKING/lws_build
cmake -DLWS_LINK_TESTAPPS_DYNAMIC=ON \
-DLWS_WITH_LIBUV=OFF -DLWS_WITHOUT_BUILTIN_GETIFADDRS=ON \
-DLWS_USE_BUNDLED_ZLIB=OFF -DLWS_WITHOUT_BUILTIN_SHA1=ON \
-DLWS_WITH_STATIC=OFF -DLWS_IPV6=ON -DLWS_WITH_HTTP2=OFF \
-DLWS_WITHOUT_CLIENT=OFF -DLWS_WITHOUT_SERVER=OFF \
-DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON \
-DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON -DLWS_WITHOUT_TEST_PING=ON \
-DLWS_WITHOUT_TEST_CLIENT=ON $WORKING/lws-src \
&& make \
&& make DESTDIR=$WORKING/lws_install install \
&& tar -z -C $WORKING/lws_install -cf /libwebsockets-image.tar.gz usr \
&& make install
cd $WORKING/proton_build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_LINKTIME_OPTIMIZATION=ON \
-DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
Expand Down
13 changes: 7 additions & 6 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,23 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as builder
RUN dnf -y --setopt=tsflags=nodocs install \
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-4.el8.noarch.rpm \
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-4.el8.noarch.rpm \
&& dnf -y --setopt=tsflags=nodocs install epel-release \
&& dnf config-manager --set-enabled powertools \
&& dnf clean all

RUN dnf -y --setopt=tsflags=nodocs install \
gcc gcc-c++ make cmake \
cyrus-sasl-devel openssl-devel libuuid-devel \
python3-devel swig \
libwebsockets-devel libnghttp2-devel \
libnghttp2-devel \
wget patch findutils git valgrind \
&& dnf clean all -y

WORKDIR /build
COPY . .
ENV PROTON_VERSION=0.37.0
ENV PROTON_SOURCE_URL=${PROTON_SOURCE_URL:-http://archive.apache.org/dist/qpid/proton/${PROTON_VERSION}/qpid-proton-${PROTON_VERSION}.tar.gz}
ENV LWS_VERSION=v4.3.1
ENV LWS_SOURCE_URL=${LWS_SOURCE_URL:-https://github.com/warmcat/libwebsockets/archive/refs/tags/${LWS_VERSION}.tar.gz}

ARG VERSION=UNKNOWN
ENV VERSION=$VERSION
Expand All @@ -48,7 +50,6 @@ RUN dnf -y --setopt=tsflags=nodocs update \
&& dnf -y --setopt=tsflags=nodocs install \
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-4.el8.noarch.rpm \
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-4.el8.noarch.rpm \
&& dnf -y --setopt=tsflags=nodocs install epel-release \
&& dnf config-manager --set-enabled powertools \
&& dnf clean all

Expand All @@ -57,14 +58,14 @@ RUN dnf -y --setopt=tsflags=nodocs install \
glibc \
cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl-gssapi libuuid openssl \
python3 \
libwebsockets libnghttp2 \
libnghttp2 \
gdb valgrind \
gettext hostname iputils \
&& dnf clean all

WORKDIR /
COPY --from=builder /qpid-proton-image.tar.gz /skupper-router-image.tar.gz /
RUN tar zxpf qpid-proton-image.tar.gz && tar zxpf skupper-router-image.tar.gz && rm -f /qpid-proton-image.tar.gz /skupper-router-image.tar.gz
COPY --from=builder /qpid-proton-image.tar.gz /skupper-router-image.tar.gz /libwebsockets-image.tar.gz /
RUN tar zxpf qpid-proton-image.tar.gz && tar zxpf skupper-router-image.tar.gz && tar zxpf libwebsockets-image.tar.gz && rm -f /qpid-proton-image.tar.gz /skupper-router-image.tar.gz /libwebsockets-image.tar.gz

WORKDIR /home/skrouterd/etc
WORKDIR /home/skrouterd/bin
Expand Down