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 Dockerfile for rockylinux-9 #54

Merged
merged 2 commits into from
May 19, 2023
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
22 changes: 17 additions & 5 deletions bin/yum-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ echo "Detected RedHat/Centos/Fedora version: ${VERSION_ID} arch: ${ARCH}"
# Enable EPEL
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION_ID}.noarch.rpm || true
# PowerTools for Rocky 8
if [[ ${VERSION_ID} -gt 7 ]]; then
if [[ ${VERSION_ID} -eq 8 ]]; then
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled powertools
yum update -y
Expand All @@ -112,7 +112,12 @@ yum groupinstall -y 'Development Tools'
# help2man is for docs
yum install -y sudo git wget which autoconf autoconf-archive automake curl-devel libicu-devel \
libtool ncurses-devel nspr-devel zip readline-devel unzip perl \
createrepo xfsprogs-devel rpmdevtools help2man
createrepo xfsprogs-devel rpmdevtools
if [[ ${VERSION_ID} -eq 9 ]]; then
dnf --enablerepo=crb install -y help2man
else
yum install -y help2man
fi

# Node.js
pushd /tmp
Expand Down Expand Up @@ -143,14 +148,19 @@ if [[ ${VERSION_ID} -eq 7 ]]; then
yum install -y python36 python36-pip python-virtualenv
PIP=pip3.6
ln -s /usr/bin/python3.6 /usr/local/bin/python3
else
elif [[ ${VERSION_ID} -eq 8 ]]; then
yum install -y python3-pip python3-virtualenv
PIP=pip3
else
yum install -y python3-pip
PIP=pip3
fi


${PIP} --default-timeout=1000 install docutils==0.13.1 sphinx==1.5.3 sphinx_rtd_theme \
typing nose requests hypothesis==3.79.0
if [[ ${VERSION_ID} -eq 9 ]]; then
${PIP} --default-timeout=1000 install wheel virtualenv
fi

# js packages, as long as we're not told to skip them
if [[ $1 != "nojs" ]]; then
Expand All @@ -160,8 +170,10 @@ if [[ $1 != "nojs" ]]; then
yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo
# install the JS packages
yum install -y couch-js-devel
else
elif [[ ${VERSION_ID} -eq 8 ]]; then
yum install -y mozjs60-devel
else
yum install -y mozjs78-devel
fi
else
# install js build-time dependencies only
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#
DEBIANS="debian-buster debian-bullseye"
UBUNTUS="ubuntu-bionic ubuntu-focal ubuntu-jammy"
CENTOSES="centos-7 rockylinux-8"
CENTOSES="centos-7 rockylinux-8 rockylinux-9"
ERLANGALL_BASE="debian-bullseye"
XPLAT_BASE="debian-bullseye"
XPLAT_ARCHES="arm64v8 ppc64le s390x"
Expand Down
64 changes: 64 additions & 0 deletions dockerfiles/rockylinux-9
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations

# NOTE: These are intended to be built using the arguments as
# described in ../build.sh. See that script for more details.

FROM rockylinux:9

# Install Java
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"

# Choose whether to install SpiderMonkey 1.8.5, default yes
ARG js=js
# Choose whether to install Erlang, default yes
ARG erlang=erlang
# Select version of Node, Erlang and Elixir to install
ARG erlangversion=24.3.4.10
ARG elixirversion=v1.13.4
ARG nodeversion=14

# Create Jenkins user and group
RUN groupadd --gid 910 jenkins; \
useradd --uid 910 --gid jenkins --create-home jenkins

# Copy couchdb-ci repo into root's home directory
ADD --chown=root:root bin /root/couchdb-ci/bin/
ADD --chown=root:root files /root/couchdb-ci/files/

# Jenkins builds in /usr/src/couchdb.
RUN mkdir -p /usr/src/couchdb; \
chown -R jenkins:jenkins /usr/src/couchdb

# Add /usr/local/lib to global LD_LIBRARY_PATH for CentOS
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf

# Install all dependencies, and optionally SM 1.8.5
# This allows us to use the same Dockerfile for building SM
RUN ERLANGVERSION=$erlangversion \
ELIXIRVERSION=$elixirversion \
NODEVERSION=$nodeversion \
/root/couchdb-ci/bin/install-dependencies.sh $js $erlang

# Allow Jenkins to sudo
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/jenkins

USER jenkins

# overwrite this with 'CMD []' in a dependent Dockerfile
CMD ["/bin/bash"]
1 change: 1 addition & 0 deletions pull-all-couchdbdev-docker
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ KEEP_IMAGES=(
couchdbci-debian:bullseye-erlang-25.3
couchdbci-debian:buster-erlang-24.3.4.10
couchdbci-debian:bullseye-erlang-24.3.4.10
couchdbci-centos:9-erlang-24.3.4.10
couchdbci-centos:8-erlang-24.3.4.10
couchdbci-centos:7-erlang-24.3.4.10
couchdbci-ubuntu:bionic-erlang-24.3.4.10
Expand Down