Skip to content

Commit f1a60ee

Browse files
authored
Add Dockerfile for rockylinux-9 (#54)
* Add Dockerfile for rockylinux-9 Signed-off-by: Kun-Lu <kun.lu@ibm.com>
1 parent 281aab9 commit f1a60ee

File tree

4 files changed

+83
-6
lines changed

4 files changed

+83
-6
lines changed

bin/yum-dependencies.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ echo "Detected RedHat/Centos/Fedora version: ${VERSION_ID} arch: ${ARCH}"
8787
# Enable EPEL
8888
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION_ID}.noarch.rpm || true
8989
# PowerTools for Rocky 8
90-
if [[ ${VERSION_ID} -gt 7 ]]; then
90+
if [[ ${VERSION_ID} -eq 8 ]]; then
9191
dnf install -y 'dnf-command(config-manager)'
9292
dnf config-manager --set-enabled powertools
9393
yum update -y
@@ -112,7 +112,12 @@ yum groupinstall -y 'Development Tools'
112112
# help2man is for docs
113113
yum install -y sudo git wget which autoconf autoconf-archive automake curl-devel libicu-devel \
114114
libtool ncurses-devel nspr-devel zip readline-devel unzip perl \
115-
createrepo xfsprogs-devel rpmdevtools help2man
115+
createrepo xfsprogs-devel rpmdevtools
116+
if [[ ${VERSION_ID} -eq 9 ]]; then
117+
dnf --enablerepo=crb install -y help2man
118+
else
119+
yum install -y help2man
120+
fi
116121

117122
# Node.js
118123
pushd /tmp
@@ -143,14 +148,19 @@ if [[ ${VERSION_ID} -eq 7 ]]; then
143148
yum install -y python36 python36-pip python-virtualenv
144149
PIP=pip3.6
145150
ln -s /usr/bin/python3.6 /usr/local/bin/python3
146-
else
151+
elif [[ ${VERSION_ID} -eq 8 ]]; then
147152
yum install -y python3-pip python3-virtualenv
148153
PIP=pip3
154+
else
155+
yum install -y python3-pip
156+
PIP=pip3
149157
fi
150158

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

155165
# js packages, as long as we're not told to skip them
156166
if [[ $1 != "nojs" ]]; then
@@ -160,8 +170,10 @@ if [[ $1 != "nojs" ]]; then
160170
yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo
161171
# install the JS packages
162172
yum install -y couch-js-devel
163-
else
173+
elif [[ ${VERSION_ID} -eq 8 ]]; then
164174
yum install -y mozjs60-devel
175+
else
176+
yum install -y mozjs78-devel
165177
fi
166178
else
167179
# install js build-time dependencies only

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4848
#
4949
DEBIANS="debian-buster debian-bullseye"
5050
UBUNTUS="ubuntu-bionic ubuntu-focal ubuntu-jammy"
51-
CENTOSES="centos-7 rockylinux-8"
51+
CENTOSES="centos-7 rockylinux-8 rockylinux-9"
5252
ERLANGALL_BASE="debian-bullseye"
5353
XPLAT_BASE="debian-bullseye"
5454
XPLAT_ARCHES="arm64v8 ppc64le s390x"

dockerfiles/rockylinux-9

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
17+
# NOTE: These are intended to be built using the arguments as
18+
# described in ../build.sh. See that script for more details.
19+
20+
FROM rockylinux:9
21+
22+
# Install Java
23+
ENV JAVA_HOME=/opt/java/openjdk
24+
COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
25+
ENV PATH="${JAVA_HOME}/bin:${PATH}"
26+
27+
# Choose whether to install SpiderMonkey 1.8.5, default yes
28+
ARG js=js
29+
# Choose whether to install Erlang, default yes
30+
ARG erlang=erlang
31+
# Select version of Node, Erlang and Elixir to install
32+
ARG erlangversion=24.3.4.10
33+
ARG elixirversion=v1.13.4
34+
ARG nodeversion=14
35+
36+
# Create Jenkins user and group
37+
RUN groupadd --gid 910 jenkins; \
38+
useradd --uid 910 --gid jenkins --create-home jenkins
39+
40+
# Copy couchdb-ci repo into root's home directory
41+
ADD --chown=root:root bin /root/couchdb-ci/bin/
42+
ADD --chown=root:root files /root/couchdb-ci/files/
43+
44+
# Jenkins builds in /usr/src/couchdb.
45+
RUN mkdir -p /usr/src/couchdb; \
46+
chown -R jenkins:jenkins /usr/src/couchdb
47+
48+
# Add /usr/local/lib to global LD_LIBRARY_PATH for CentOS
49+
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
50+
51+
# Install all dependencies, and optionally SM 1.8.5
52+
# This allows us to use the same Dockerfile for building SM
53+
RUN ERLANGVERSION=$erlangversion \
54+
ELIXIRVERSION=$elixirversion \
55+
NODEVERSION=$nodeversion \
56+
/root/couchdb-ci/bin/install-dependencies.sh $js $erlang
57+
58+
# Allow Jenkins to sudo
59+
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/jenkins
60+
61+
USER jenkins
62+
63+
# overwrite this with 'CMD []' in a dependent Dockerfile
64+
CMD ["/bin/bash"]

pull-all-couchdbdev-docker

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ KEEP_IMAGES=(
77
couchdbci-debian:bullseye-erlang-25.3
88
couchdbci-debian:buster-erlang-24.3.4.10
99
couchdbci-debian:bullseye-erlang-24.3.4.10
10+
couchdbci-centos:9-erlang-24.3.4.10
1011
couchdbci-centos:8-erlang-24.3.4.10
1112
couchdbci-centos:7-erlang-24.3.4.10
1213
couchdbci-ubuntu:bionic-erlang-24.3.4.10

0 commit comments

Comments
 (0)