|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +# or more contributor license agreements. See the NOTICE file |
| 4 | +# distributed with this work for additional information |
| 5 | +# regarding copyright ownership. The ASF licenses this file |
| 6 | +# to you under the Apache License, Version 2.0 (the |
| 7 | +# "License"); you may not use this file except in compliance |
| 8 | +# with the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, |
| 13 | +# software distributed under the License is distributed on an |
| 14 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +# KIND, either express or implied. See the License for the |
| 16 | +# specific language governing permissions and limitations |
| 17 | +# under the License. |
| 18 | +# |
| 19 | + |
| 20 | +FROM quay.io/centos/centos:stream9 as builder |
| 21 | + |
| 22 | +RUN dnf -y install epel-release 'dnf-command(config-manager)' |
| 23 | +RUN dnf config-manager --set-enabled crb |
| 24 | + |
| 25 | +# I am referring to the CentOS7 package (.spec file in the src.rpm) to look up dependencies |
| 26 | +# https://koji.fedoraproject.org/koji/buildinfo?buildID=1180279 |
| 27 | +# TODO seemingly unavailable packages: |
| 28 | +# xqilla-devel |
| 29 | + |
| 30 | +RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \ |
| 31 | + rpm-build \ |
| 32 | + gcc gcc-c++ make cmake \ |
| 33 | + boost-devel boost-filesystem boost-program-options \ |
| 34 | + xerces-c-devel \ |
| 35 | + rdma-core-devel \ |
| 36 | + libdb-devel libdb-cxx-devel libaio-devel \ |
| 37 | + qpid-proton-c-devel \ |
| 38 | + swig perl-devel python3-devel ruby-devel rubygem-rexml \ |
| 39 | + libuuid-devel nss-devel nspr-devel nss-tools cyrus-sasl cyrus-sasl-lib cyrus-sasl-devel \ |
| 40 | + wget tar patch findutils git pkgconfig |
| 41 | + |
| 42 | +# Workaround for latest release of qpid-python being incompatible with python 3 |
| 43 | +WORKDIR /build |
| 44 | +RUN git clone https://github.com/apache/qpid-python.git \ |
| 45 | + && cd qpid-python \ |
| 46 | + && python3 setup.py install |
| 47 | + |
| 48 | +# git clone https://github.com/apache/qpid-cpp.git |
| 49 | +COPY . . |
| 50 | +RUN eval "$(rpmbuild --eval '%set_build_flags')" \ |
| 51 | + && cmake -S . -B cmake-build \ |
| 52 | + -DBUILD_DOCS=OFF \ |
| 53 | + -DBUILD_TESTING=OFF \ |
| 54 | + -DCMAKE_INSTALL_PREFIX=/usr \ |
| 55 | + -DPYTHON_EXECUTABLE=/usr/bin/python3 \ |
| 56 | + && cmake --build "cmake-build" --parallel "$(nproc)" --verbose \ |
| 57 | + && cmake --install "cmake-build" |
| 58 | + |
| 59 | +EXPOSE 5672 |
| 60 | +CMD ["/usr/sbin/qpidd"] |
0 commit comments