Skip to content

Commit

Permalink
Dockerfile: conditionalize dep installation
Browse files Browse the repository at this point in the history
Signed-off-by: Nizamudeen A <[email protected]>
  • Loading branch information
nizamial09 committed Jun 4, 2024
1 parent 087ec20 commit 8f41781
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions docker/ceph/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@ ARG CENTOS_VERSION=8
FROM quay.io/centos/centos:stream$CENTOS_VERSION as ceph-base
ARG CENTOS_VERSION

RUN dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos -y
RUN if [ "$CENTOS_VERSION" = "8" ]; then \
dnf --disablerepo '*' --enablerepo=extras centos-linux-repos centos-stream-repos swap -y; \
fi
RUN dnf distro-sync -y

RUN dnf install -y epel-release \
&& dnf clean packages
RUN dnf install -y bind-utils curl dnf dnf-plugins-core git golang-github-prometheus hostname \
RUN if [ "$CENTOS_VERSION" = "8" ]; then \
dnf install -y curl; \
fi
RUN dnf install -y bind-utils dnf dnf-plugins-core git golang-github-prometheus hostname \
iproute iputils jq jsonnet lsof net-tools procps-ng \
python3-jinja2 python3-jsonpatch python3-pip util-linux which \
&& dnf clean packages

RUN sed -i 's/gpgcheck=1/gpgcheck=0/' /etc/dnf/dnf.conf
RUN sed -i 's/skip_if_unavailable=False/skip_if_unavailable=True/' /etc/dnf/dnf.conf

RUN dnf config-manager --set-enabled powertools
RUN if [ "$CENTOS_VERSION" = "8" ]; then \
dnf config-manager --set-enabled powertools; \
elif [ "$CENTOS_VERSION" = "9" ]; then \
dnf config-manager --set-enabled crb; \
fi

RUN pip3 install -U pip

Expand Down Expand Up @@ -51,15 +60,18 @@ RUN dnf install -y ant doxygen libxslt-devel libxml2-devel graphviz python3-deve
&& dnf clean packages

# For dev. mode: run backend unit tests.
RUN dnf install -y libtool-ltdl-devel libxml2-devel python36-devel xmlsec1-devel xmlsec1-openssl-devel \
RUN dnf install -y libtool-ltdl-devel libxml2-devel xmlsec1-devel xmlsec1-openssl-devel \
&& dnf clean packages
RUN if [ "$CENTOS_VERSION" = "8" ]; then \
dnf install -y python36-devel; \
fi

# SSO (after installing xmlsec deps).
RUN pip3 install python3-saml==1.9.0

# NFS Ganesha.
RUN dnf install -y centos-release-nfs-ganesha30 \
&& dnf install -y nfs-ganesha-ceph nfs-ganesha-rados-grace nfs-ganesha-rados-urls \
RUN dnf install -y centos-release-nfs-ganesha5 centos-release-ceph-reef \
&& dnf install -y libcephfs2 nfs-ganesha-ceph nfs-ganesha-rados-grace nfs-ganesha-rados-urls \
&& dnf clean packages

# S3 benchmark:
Expand Down
2 changes: 1 addition & 1 deletion docker/ceph/rpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG CENTOS_VERSION
# Sepia provide missing dependencies until epel provide all dependencies.
RUN dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/${CENTOS_VERSION}/
RUN dnf config-manager --setopt gpgcheck=0 apt-mirror.front.sepia.ceph.com_lab-extras_${CENTOS_VERSION}_ --save
RUN dnf copr enable -y ktdreyer/ceph-el${CENTOS_VERSION}
RUN dnf copr enable -y ceph/el${CENTOS_VERSION}

ARG USE_REPO_FILES=0
ARG REPO_URL
Expand Down

0 comments on commit 8f41781

Please sign in to comment.