Skip to content

Commit

Permalink
DISPATCH-2357: fix(Dockerfile): switch to using Rocky Linux 8 as Cent…
Browse files Browse the repository at this point in the history
…OS 8 is EOL (#1726)

We need to use supported CentOS. In newer CentOS Streams, the PowerTools repo was renamed to crb (same name as in RHEL).
Using Rocky Linux 8 seems most sensible, as we are not ready to upgrade all the way to CentOS 9 or 10.

The Dockerfile was initially intended as a help for development, not really a release artifact.
If a development Dockerfile is needed, it can be added in the future.

Meanwhile, using development versions of software at random places, which then becomes part of our release tar.gz, creates bad impression and should be eliminated.

As a compromise, the Dockerfile can use the contents of the local directory for Dispatch sources.
In a released tar.gz, that would be the released content, so we're fine there.
  • Loading branch information
jiridanek authored Dec 31, 2024
1 parent 424faac commit 8e0918a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ dockerfiles

build
cmake-build-*
**/node_modules
tests/system_test.dir
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,36 @@

################# Begin code #######

FROM quay.io/centos/centos:stream8
FROM docker.io/library/rockylinux:8

MAINTAINER "dev@qpid.apache.org"

ENV PROTON_VERSION=0.36.0
ENV DISPATCH_VERSION=1.19.0
ENV Python_EXECUTABLE=/usr/bin/python3

# Install all the required packages. Some in this list were picked off from proton's INSTALL.md (https://github.com/apache/qpid-proton/blob/main/INSTALL.md) and the rest are from dispatch (https://github.com/apache/qpid-dispatch/blob/main/README)

# Enable additional package repositories for CentOS
# note: PowerTools is called CodeReady Linux Builder in RHEL 8
# and it's become crb in CentOS Stream 9
RUN dnf -y install epel-release
RUN dnf -y install 'dnf-command(config-manager)'
RUN dnf config-manager --set-enabled powertools

# now install the rest of the packages
RUN dnf -y install gcc gcc-c++ cmake libuuid-devel openssl-devel cyrus-sasl-devel cyrus-sasl-plain cyrus-sasl-gssapi cyrus-sasl-md5 swig python3-devel java-11-openjdk-devel git make doxygen valgrind emacs libuv libuv-devel libwebsockets-devel && dnf clean all -y

# Create a main directory and clone the qpid-proton repo from github
RUN mkdir /main && cd /main && git clone --single-branch --branch "${PROTON_VERSION}" https://github.com/apache/qpid-proton.git && cd /main/qpid-proton && mkdir /main/qpid-proton/build
# Create a main directory and clone a (released!) version of qpid-proton repo from github
RUN mkdir /main && cd /main && git clone --depth 1 --branch "${PROTON_VERSION}" https://github.com/apache/qpid-proton.git && cd /main/qpid-proton && mkdir /main/qpid-proton/build

WORKDIR /main/qpid-proton/build

# make and install proton
RUN cmake .. -DPython_EXECUTABLE="${Python_EXECUTABLE}" -DSYSINSTALL_BINDINGS=ON -DCMAKE_INSTALL_PREFIX=/usr -DSYSINSTALL_PYTHON=ON && make install

# Clone the qpid-dispatch git repo
RUN cd /main && git clone --single-branch --branch "${DISPATCH_VERSION}" https://github.com/apache/qpid-dispatch.git && mkdir /main/qpid-dispatch/build
# Copy in the qpid-dispatch sources
COPY ./ /main/qpid-dispatch
RUN mkdir /main/qpid-dispatch/build

WORKDIR /main/qpid-dispatch/build
RUN cmake .. -DPython_EXECUTABLE="${Python_EXECUTABLE}" -DCMAKE_INSTALL_PREFIX=/usr && make install
Expand Down

0 comments on commit 8e0918a

Please sign in to comment.