diff --git a/Jenkinsfile b/Jenkinsfile
index 60f2151..17db421 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -6,7 +6,7 @@
import groovy.json.JsonSlurperClassic
// email list for scheduled builds (includes security vulnerability)
-emailList = 'vitaly.korolev@progress.com, Barkha.Choithani@progress.com, Fayez.Saliba@progress.com, Sumanth.Ravipati@progress.com, Peng.Zhou@progress.com'
+emailList = 'vitaly.korolev@progress.com, Barkha.Choithani@progress.com, Sumanth.Ravipati@progress.com, Peng.Zhou@progress.com, romain.winieski@progress.com'
// email list for security vulnerabilities only
emailSecList = 'Rangan.Doreswamy@progress.com, Mahalakshmi.Srinivasan@progress.com'
gitCredID = 'marklogic-builder-github'
@@ -104,17 +104,43 @@ void resultNotification(message) {
} else {
emailList = params.emailList
}
- jira_link = "https://progresssoftware.atlassian.net/browse/${JIRA_ID}"
- email_body = "Jenkins pipeline for ${env.JOB_NAME}
Build Number: ${env.BUILD_NUMBER}
Lint Output:
${LINT_OUTPUT}
Vulnerabilities: ${SCAN_OUTPUT}
Image Size:
${IMAGE_SIZE}
docker pull ${dockerRegistry}/${latestTag}
Build URL:
${env.BUILD_URL}"
- jira_email_body = "${email_body}
Jira URL:
${jira_link}"
-
+
+ email_body = "Build URL: ${env.BUILD_URL}
" +
+ "Image type: ${env.dockerImageType}
" +
+ "Lint Output:
" +
+ "${LINT_OUTPUT}
" +
+ "Vulnerabilities: ${SCAN_OUTPUT}
" +
+ "Full scan report.
" +
+ "Image Size:
${IMAGE_SIZE}
" +
+ "docker pull ${dockerRegistry}/${latestTag}
"
+ if (params.DOCKER_TESTS) {
+ email_body = "${email_body} Docker Tests Report
"
+ } else {
+ email_body = "${email_body} Docker Tests Skipped
"
+ }
+ if (params.SCAP_SCAN) {
+ email_body = "${email_body} SCAP Scan Report
"
+ if ( BRANCH_NAME == 'develop' ) {
+ emailList = emailList+','+emailSecList
+ }
+ } else {
+ email_body = "${email_body} SCAP Scan Skipped
"
+ }
+
+ // If Jira ID is available, add comment to the ticket and add link to email.
if (JIRA_ID) {
+ def jira_link = "https://progresssoftware.atlassian.net/browse/${JIRA_ID}"
def comment = [ body: "Jenkins pipeline build result: ${message}" ]
- jiraAddComment site: 'JIRA', idOrKey: JIRA_ID, failOnError: false, input: comment
- mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailList}", body: "${jira_email_body}", subject: "${message}: ${env.JOB_NAME} #${env.BUILD_NUMBER} - ${JIRA_ID}"
- } else {
- mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailList}", body: "${email_body}", subject: "${message}: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
+ jiraAddComment site: 'JIRA',
+ input: comment,
+ idOrKey: JIRA_ID,
+ failOnError: false
+ email_body = "${email_body}
Jira URL:
${jira_link}"
}
+ mail to: "${emailList}",
+ body: "${email_body}",
+ subject: "${message}: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
+ charset: 'UTF-8', mimeType: 'text/html'
}
void copyRPMs() {
@@ -124,12 +150,22 @@ void copyRPMs() {
RPMversion = "10.0"
}
else if (marklogicVersion == "11") {
- RPMsuffix = ".nightly-rhel"
+ //if dockerImageType contains "ubi9" then use nightly-rhel9 suffix
+ if (dockerImageType.contains("ubi9")) {
+ RPMsuffix = ".nightly-rhel9"
+ } else {
+ RPMsuffix = ".nightly-rhel"
+ }
RPMbranch = "b11"
RPMversion = "11.3"
}
else if (marklogicVersion == "12") {
- RPMsuffix = ".nightly-rhel"
+ //if dockerImageType contains "ubi9" then use nightly-rhel9 suffix
+ if (dockerImageType.contains("ubi9")) {
+ RPMsuffix = ".nightly-rhel9"
+ } else {
+ RPMsuffix = ".nightly-rhel"
+ }
RPMbranch = "b12"
RPMversion = "12.0"
}
@@ -168,7 +204,7 @@ void buildDockerImage() {
}
void pullUpgradeDockerImage() {
- if (dockerImageType == "ubi-rootless" ) {
+ if (dockerImageType == "ubi-rootless" && params.DOCKER_TESTS != "true") {
sh """
echo 'dockerImageType is set to ubi-rootless, skipping this stage and Docker upgrade test.'
"""
@@ -217,16 +253,14 @@ void lint() {
void vulnerabilityScan() {
sh """
- make scan current_image=marklogic/marklogic-server-${dockerImageType}:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion} Jenkins=true
- grep \'High\\|Critical\' scan-server-image.txt
+ make scan current_image=marklogic/marklogic-server-${dockerImageType}:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion} docker_image_type=${dockerImageType} Jenkins=true
"""
-
- SCAN_OUTPUT = sh(returnStdout: true, script: 'grep \'High\\|Critical\' scan-server-image.txt')
+ SCAN_OUTPUT = sh(returnStdout: true, script: "cat scan/report-${env.dockerImageType}.txt")
+ sh 'echo "SCAN_OUTPUT: ${SCAN_OUTPUT}"'
if (SCAN_OUTPUT.size()) {
- mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailSecList}", body: "
Jenkins pipeline for ${env.JOB_NAME}
Build Number: ${env.BUILD_NUMBER}
Vulnerabilities: ${SCAN_OUTPUT}
", subject: "Critical or High Security Vulnerabilities Found: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
+ mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailSecList}", body: "
Jenkins pipeline for ${env.JOB_NAME}
Build Number: ${env.BUILD_NUMBER}
Vulnerabilities: ${SCAN_OUTPUT}
", subject: "Critical or High Security Vulnerabilities Found: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
}
-
- sh '''rm -f scan-server-image.txt'''
+ archiveArtifacts artifacts: 'scan/*', onlyIfSuccessful: true
}
void publishToInternalRegistry() {
@@ -265,7 +299,31 @@ void publishToInternalRegistry() {
void publishTestResults() {
junit allowEmptyResults:true, testResults: '**/test_results/docker-tests.xml,**/container-structure-test.xml'
- publishHTML allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'test/test_results', reportFiles: 'report.html', reportName: 'Docker Tests Report', reportTitles: ''
+ if (params.DOCKER_TESTS) {
+ echo 'Publishing Docker results..'
+ publishHTML allowMissing: false,
+ alwaysLinkToLastBuild: true,
+ keepAll: true,
+ reportDir: 'test/test_results',
+ reportFiles: 'report.html',
+ reportName: 'Docker Tests Report',
+ reportTitles: "Build ${env.BUILD_NUMBER}"
+ }
+ if (params.SCAP_SCAN) {
+ echo 'Publishing SCAP scan results..'
+ publishHTML allowMissing: false,
+ alwaysLinkToLastBuild: true,
+ keepAll: true, reportDir: 'scap',
+ reportFiles: 'scap_scan_report.html',
+ reportName: 'Open SCAP Report',
+ reportTitles: "Build ${env.BUILD_NUMBER}"
+ }
+}
+
+void scapScan() {
+ sh """
+ make scap-scan current_image=marklogic/marklogic-server-${dockerImageType}:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
+ """
}
pipeline {
@@ -280,15 +338,16 @@ pipeline {
skipStagesAfterUnstable()
}
triggers {
- parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 02 * * * % marklogicVersion=11;dockerImageType=centos
+ parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 02 * * * % marklogicVersion=10;dockerImageType=ubi
+ 00 02 * * * % marklogicVersion=10;dockerImageType=ubi-rootless;SCAP_SCAN=true
00 02 * * * % marklogicVersion=11;dockerImageType=ubi
- 00 02 * * * % marklogicVersion=11;dockerImageType=ubi-rootless
- 30 02 * * * % marklogicVersion=10;dockerImageType=centos
- 30 02 * * * % marklogicVersion=10;dockerImageType=ubi
- 30 02 * * * % marklogicVersion=10;dockerImageType=ubi-rootless
- 00 03 * * * % marklogicVersion=12;dockerImageType=centos
- 00 03 * * * % marklogicVersion=12;dockerImageType=ubi
- 00 03 * * * % marklogicVersion=12;dockerImageType=ubi-rootless''' : '')
+ 30 02 * * * % marklogicVersion=11;dockerImageType=ubi-rootless;SCAP_SCAN=true
+ 30 02 * * * % marklogicVersion=12;dockerImageType=ubi
+ 30 02 * * * % marklogicVersion=12;dockerImageType=ubi-rootless;SCAP_SCAN=true
+ 00 03 * * * % marklogicVersion=11;dockerImageType=ubi9
+ 00 03 * * * % marklogicVersion=11;dockerImageType=ubi9-rootless;SCAP_SCAN=true
+ 00 03 * * * % marklogicVersion=12;dockerImageType=ubi9
+ 00 03 * * * % marklogicVersion=12;dockerImageType=ubi9-rootless;SCAP_SCAN=true''' : '')
}
environment {
QA_LICENSE_KEY = credentials('QA_LICENSE_KEY')
@@ -296,8 +355,8 @@ pipeline {
parameters {
string(name: 'emailList', defaultValue: emailList, description: 'List of email for build notification', trim: true)
- string(name: 'dockerVersion', defaultValue: '2.0.0', description: 'ML Docker version. This version along with ML rpm package version will be the image tag as {ML_Version}_{dockerVersion}', trim: true)
- choice(name: 'dockerImageType', choices: 'ubi-rootless\nubi\ncentos', description: 'Platform type for Docker image. Will be made part of the docker image tag')
+ string(name: 'dockerVersion', defaultValue: '2.1.0', description: 'ML Docker version. This version along with ML rpm package version will be the image tag as {ML_Version}_{dockerVersion}', trim: true)
+ choice(name: 'dockerImageType', choices: 'ubi-rootless\nubi\nubi9-rootless\nubi9', description: 'Platform type for Docker image. Will be made part of the docker image tag')
string(name: 'upgradeDockerImage', defaultValue: '', description: 'Docker image for testing upgrades. Defaults to ubi image if left blank.\n Currently upgrading to ubi-rotless is not supported hence the test is skipped when ubi-rootless image is provided.', trim: true)
choice(name: 'marklogicVersion', choices: '11\n12\n10', description: 'MarkLogic Server Branch. used to pick appropriate rpm')
string(name: 'ML_RPM', defaultValue: '', description: 'URL for RPM to be used for Image creation. \n If left blank nightly ML rpm will be used.\n Please provide Jenkins accessible path e.g. /project/engineering or /project/qa', trim: true)
@@ -305,6 +364,7 @@ pipeline {
booleanParam(name: 'PUBLISH_IMAGE', defaultValue: false, description: 'Publish image to internal registry')
booleanParam(name: 'TEST_STRUCTURE', defaultValue: true, description: 'Run container structure tests')
booleanParam(name: 'DOCKER_TESTS', defaultValue: true, description: 'Run docker tests')
+ booleanParam(name: 'SCAP_SCAN', defaultValue: false, description: 'Run Open SCAP scan on the image.')
}
stages {
@@ -344,6 +404,15 @@ pipeline {
}
}
+ stage('SCAP-Scan') {
+ when {
+ expression { return params.SCAP_SCAN }
+ }
+ steps {
+ scapScan()
+ }
+ }
+
stage('Structure-Tests') {
when {
expression { return params.TEST_STRUCTURE }
@@ -374,17 +443,18 @@ pipeline {
build job: 'MarkLogic-Docker-Kubernetes/docker/docker-nightly-builds-qa', wait: false, parameters: [string(name: 'dockerImageType', value: "${dockerImageType}"), string(name: 'marklogicVersion', value: "${RPMversion}")]
}
}
+
}
post {
always {
sh '''
cd src
- rm -rf *.rpm
- docker rm -f $(docker ps -a -q) || true
- docker system prune --force --filter "until=720h"
- docker volume prune --force
- docker image prune --force --all
+ rm -rf *.rpm NOTICE.txt
+ docker stop $(docker ps -a -q) || true
+ docker system prune --force --all
+ docker volume prune --force --all
+ docker system df
'''
publishTestResults()
}
diff --git a/Makefile b/Makefile
index f06adc8..07e260a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,55 @@
dockerTag?=internal
package?=MarkLogic.rpm
repo_dir=marklogic
-docker_build_options=--compress
+docker_build_options=--compress --platform linux/amd64
build_branch?=local
docker_image_type?=ubi
upgrade_docker_image_type?=ubi
upgrade_image?=${repo_dir}/marklogic-server-${upgrade_docker_image_type}:${dockerTag}
current_image?=${repo_dir}/marklogic-server-${docker_image_type}:${dockerTag}
+open_scap_version?=0.1.74
#***************************************************************************
# build docker image
#***************************************************************************
build:
+# NOTICE file need to be in the build context to be included in the built image
cp NOTICE.txt src/NOTICE.txt
-#ubi-rootless uses the same dependencies as ubi image
-ifeq ($(docker_image_type),ubi-rootless)
+
+# rootless images use the same dependencies as ubi image so we copy the file
+ifeq ($(docker_image_type),ubi9)
+ cp dockerFiles/marklogic-server-ubi\:base dockerFiles/marklogic-server-ubi9\:base
+endif
+ifeq ($(findstring rootless,$(docker_image_type)),rootless)
cp dockerFiles/marklogic-deps-ubi\:base dockerFiles/marklogic-deps-ubi-rootless\:base
+ cp dockerFiles/marklogic-deps-ubi9\:base dockerFiles/marklogic-deps-ubi9-rootless\:base
+ cp dockerFiles/marklogic-server-ubi-rootless\:base dockerFiles/marklogic-server-ubi9-rootless\:base
+endif
+
+# retrieve and copy open scap hardening script
+ifeq ($(findstring rootless,$(docker_image_type)),rootless)
+ [ -f scap-security-guide-${open_scap_version}.zip ] || curl -Lo scap-security-guide-${open_scap_version}.zip https://github.com/ComplianceAsCode/content/releases/download/v${open_scap_version}/scap-security-guide-${open_scap_version}.zip
+#UBI9 needs a different version of the remediation script
+ifeq ($(findstring ubi9,$(docker_image_type)),ubi9)
+ unzip -p scap-security-guide-${open_scap_version}.zip scap-security-guide-${open_scap_version}/bash/rhel9-script-cis.sh > src/rhel-script-cis.sh
+else
+ unzip -p scap-security-guide-${open_scap_version}.zip scap-security-guide-${open_scap_version}/bash/rhel8-script-cis.sh > src/rhel-script-cis.sh
endif
+endif
+
+
+# build the image
cd src/; docker build ${docker_build_options} -t "${repo_dir}/marklogic-deps-${docker_image_type}:${dockerTag}" -f ../dockerFiles/marklogic-deps-${docker_image_type}:base .
- cd src/; docker build ${docker_build_options} -t "${repo_dir}/marklogic-server-${docker_image_type}:${dockerTag}" --build-arg BASE_IMAGE=${repo_dir}/marklogic-deps-${docker_image_type}:${dockerTag} --build-arg ML_RPM=${package} --build-arg ML_USER=marklogic_user --build-arg ML_DOCKER_VERSION=${dockerVersion} --build-arg ML_VERSION=${marklogicVersion} --build-arg ML_CONVERTERS=${converters} --build-arg BUILD_BRANCH=${build_branch} -f ../dockerFiles/marklogic-server-${docker_image_type}:base .
- rm -f dockerFiles/marklogic-deps-ubi-rootless\:base
+ cd src/; docker build ${docker_build_options} -t "${repo_dir}/marklogic-server-${docker_image_type}:${dockerTag}" --build-arg BASE_IMAGE=${repo_dir}/marklogic-deps-${docker_image_type}:${dockerTag} --build-arg ML_RPM=${package} --build-arg ML_USER=marklogic_user --build-arg ML_DOCKER_VERSION=${dockerVersion} --build-arg ML_VERSION=${marklogicVersion} --build-arg ML_CONVERTERS=${converters} --build-arg BUILD_BRANCH=${build_branch} --build-arg ML_DOCKER_TYPE=${docker_image_type} -f ../dockerFiles/marklogic-server-${docker_image_type}:base .
+
+# remove temporary files
+ rm -f dockerFiles/marklogic-deps-ubi-rootless\:base dockerFiles/marklogic-deps-ubi9-rootless\:base dockerFiles/marklogic-server-ubi9-rootless\:base dockerFiles/marklogic-server-ubi9\:base src/NOTICE.txt src/rhel-script-cis.sh
+
#***************************************************************************
# strcture test docker images
#***************************************************************************
structure-test:
-ifeq ($(docker_image_type),ubi-rootless)
+ifeq ($(findstring rootless,$(docker_image_type)),rootless)
@echo type is ${docker_image_type}
sed -i -e 's^DOCKER_PID_PLACEHOLDER^/home/marklogic_user/MarkLogic.pid^g' ./test/structure-test.yaml
else
@@ -71,9 +96,44 @@ lint:
#***************************************************************************
# security scan docker images
#***************************************************************************
+.PHONY: scan
scan:
- docker run --rm -v /var/run/docker.sock:/var/run/docker.sock anchore/grype:latest ${current_image} $(if $(Jenkins), > scan-server-image.txt,)
-
+ifeq ($(Jenkins),true)
+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}/scan:/scan anchore/grype:latest --output json --file /scan/report-${docker_image_type}.json ${current_image}
+ sudo chown -R builder.ml-eng scan
+ echo -e "Grype scan summary\n------------------" > scan/report-${docker_image_type}.txt
+ jq '.matches[].vulnerability.severity' scan/report-${docker_image_type}.json | sort | uniq -c >> scan/report-${docker_image_type}.txt
+ echo -e "\nGrype vulnerability list sorted by severity.\n" >> scan/report-${docker_image_type}.txt
+ echo -e "PACKAGE\tVERSION\tCVE\tSEVERITY" >> scan/report-${docker_image_type}.tmp
+# generate txt file
+ jq -r '[(.matches[] | [.artifact.name, .artifact.version, .vulnerability.id, .vulnerability.severity])] | .[] | @tsv' scan/report-${docker_image_type}.json | sort -k4 >> scan/report-${docker_image_type}.tmp
+ cat scan/report-${docker_image_type}.tmp | column -t >> scan/report-${docker_image_type}.txt
+ rm scan/report-${docker_image_type}.tmp
+# generate csv file
+ jq -r '["ID", "Severity", "CVSS Base Score", "Link", "Package"], (.matches[] | [.vulnerability.id, .vulnerability.severity, (.vulnerability.cvss[0].metrics.baseScore // "N/A"), (.relatedVulnerabilities[]?.dataSource // .vulnerability.dataSource), .artifact.name]) | @csv' scan/report-${docker_image_type}.json > scan/report-${docker_image_type}.csv
+else
+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock anchore/grype:latest ${current_image}
+endif
+#***************************************************************************
+# security scan docker images
+#***************************************************************************
+scap-scan:
+ mkdir -p scap
+ [ -f scap-security-guide-${open_scap_version}.zip ] || curl -Lo scap-security-guide-${open_scap_version}.zip https://github.com/ComplianceAsCode/content/releases/download/v${open_scap_version}/scap-security-guide-${open_scap_version}.zip
+#UBI9 needs a different version of the evaluation profile
+ifeq ($(findstring ubi9,$(current_image)),ubi9)
+ unzip -p scap-security-guide-${open_scap_version}.zip scap-security-guide-${open_scap_version}/ssg-rhel9-ds.xml > scap/ssg-rhel-ds.xml
+else
+ unzip -p scap-security-guide-${open_scap_version}.zip scap-security-guide-${open_scap_version}/ssg-rhel8-ds.xml > scap/ssg-rhel-ds.xml
+endif
+ docker run -itd --name scap-scan -v $(PWD)/scap:/scap ${current_image}
+ docker exec -u root scap-scan /bin/bash -c "microdnf update -y; microdnf install -y openscap-scanner"
+ # ensure the file is owned by root in order to avoid permission issues
+ docker exec -u root scap-scan /bin/bash -c "chown root:root /scap/ssg-rhel-ds.xml"
+ docker exec -u root scap-scan /bin/bash -c "oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis --results /scap/scap_scan_results.xml --report /scap/scap_scan_report.html /scap/ssg-rhel-ds.xml > /scap/command-output.txt 2>&1" || true
+ docker exec -u root scap-scan /bin/bash -c "rm -f /scap/ssg-rhel-ds.xml"
+ docker rm -f scap-scan
+
#***************************************************************************
# remove junk
#***************************************************************************
diff --git a/NOTICE.txt b/NOTICE.txt
index 8f691d2..49478de 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,38 +1,92 @@
-MarkLogic® Docker
-
-Copyright © 2023 MarkLogic Corporation.
+MarkLogic® Docker Container Image v2.1.0
+Copyright © 2022-2024 MarkLogic Corporation. MarkLogic and MarkLogic logo are trademarks or registered trademarks of MarkLogic Corporation in the United States and other countries. All other trademarks are the property of their respective owners.
+
This project is licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at
http://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 under the License.
+To the extent required by the applicable open-source license, a complete machine-readable copy of the source code corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and shall expire three years following the date of the final distribution of this product version by MarkLogic Corporation. To obtain such source code, send an email to Legal-thirdpartyreview@progress.com. Please specify the product and version for which you are requesting source code.
+
+MarkLogic® - Docker Container Image. If Licensee selects the option to download the Product in the Docker container image, then the Product will be provided in a Docker container image that in a separate layer also contains third-party software, RedHat UBI Docker Base Image 8 and its components and RedHat UBI Docker Base Image 9 and its components (collectively, “RedHat UBI”), licensed under the RedHat EULA found here (https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf) and , together with the third-party licenses applicable to each component.
+
+Notwithstanding anything to the contrary in the MarkLogic end user license agreement, MarkLogic makes no representations or warranties and assumes no indemnification obligations in regard to RedHat UBI, its operation, or its security. User modifications to the version of RedHat UBI provided by MarkLogic in the Docker Image, while permitted under The RedHat EULA, may result in errors or instability in performance of the Product, which are not covered by MarkLogic under warranty or maintenance terms. The source code for RedHat UBI Docker Base Image 8 may be obtained at http://iue.progress.com/3dpartysoftwares/Pages/default.aspx, and source code for any of its third-party components covered by a license requiring that source code be made available may be obtained at https://catalog.redhat.com/software/containers/ubi8/5c647760bed8bd28d0e38f9f?architecture=amd64&image=6643ab9ff6bc4ca6c09fb093&container-tabs=packages (for UBI Docker Base Image 8) and https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e?container-tabs=packages (for UBI Docker Base Image 9).
+
+Licensee is responsible for obtaining, at its own expense, any required licenses from Docker to deploy the Docker container image that contains the Product and RedHat UBI and any such deployment of the Product must comply with the terms and conditions of this Agreement.
+
+-------------------------------------------------------------------------
+
+Third Party Components
+
+ RedHat UBI Docker Base Image 8 (Commercial)
+RedHat UBI Docker Base Image 9 (Commercial)
+robotframework 7.0 (Apache-2.0)
+ robotframework-requests 0.9.7 (MIT)
+ test (MIT)
+ Tini 0.19.0 (MIT)
+
+Common Licenses
+
+Apache License, Version 2.0, January 2004 (Apache-2.0)
+
+-------------------------------------------------------------------------
+
+Third-Party Components
+
+The following is a list of third-party components used by MarkLogic Docker Container Image v2.1.0 (last updated October 18, 2024):
+
+RedHat UBI Docker Base Image 8
+https://catalog.redhat.com/software/containers/ubi8/5c647760bed8bd28d0e38f9f?architecture=amd64&image=6643ab9ff6bc4ca6c09fb093&container-tabs=gti
+
+https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf
+
+RedHat UBI Docker Base Image 9
+https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e?container-tabs=packages
+
+https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf
+
+
+robotframework 7.0 (Apache-2.0)
+https://pypi.org/pypi/robotframework
+
+For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
+
+robotframework-requests 0.9.7 (MIT)
+https://pypi.org/pypi/robotframework-requests
-This project and its code and functionality is not representative of MarkLogic Server and is not supported by MarkLogic.
+Copyright (c) 2016 Bulkan Evcimen
-Please direct questions, comments and requests regarding this notice or other licensing questions to fossreview@marklogic.com.
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-To the extent required by the applicable open source license, a complete machine-readable copy of the source code corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and shall expire three years following the date of the final distribution of this product version by MarkLogic. To obtain such source code, send an email to legal@marklogic.com. Please specify the product and version for which you are requesting source code.
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-The following software may be included in this project (last updated April 12, 2022):
+test (MIT)
+https://pypi.org/pypi/test
-Container Structure Tests 1.11.0
-Copyright 2019 Google Inc. All rights reserved.
-https://github.com/GoogleContainerTools/container-structure-test
-Made available under the Apache License 2.0. See Appendix for full text.
-http://spdx.org/licenses/Apache-2.0
+Copyright (c)
-Mark 8.0
-Egor Kovetskiy
-https://github.com/kovetskiy/mark
-Made available under the Apache License 2.0. See Appendix for full text.
-http://spdx.org/licenses/Apache-2.0
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-Appendix
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Tini 0.19.0
+https://github.com/krallin/tini/releases/
+https://github.com/krallin/tini/blob/v0.19.0/LICENSE
+
+The MIT License (MIT)
+Copyright (c) 2015 Thomas Orozco
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+Common License Appendix
Apache License
Version 2.0, January 2004
@@ -41,6 +95,7 @@ http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
@@ -62,35 +117,25 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
-(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
-(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-END OF TERMS AND CONDITIONS
-APPENDIX: How to apply the Apache License to your work.
-
-To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-Copyright [yyyy] [name of copyright owner]
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-Licensed 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
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-http://www.apache.org/licenses/LICENSE-2.0
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-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 under the License.
+END OF TERMS AND CONDITIONS
diff --git a/README.md b/README.md
index d329390..f7b7396 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,7 @@
* [Debugging](#Debugging)
* [Clean up](#Clean-up)
* [Image Tag](#Image-Tag)
+ * [Container Runtime Detection](#container-runtime-detection)
* [Known Issues and Limitations](#Known-Issues-and-Limitations)
# Introduction
@@ -45,7 +46,7 @@ Docker images are maintained by MarkLogic. Send feedback to the MarkLogic Docker
Supported Docker architectures: x86_64
-Base OS: UBI, UBI-rootless and CentOS
+Base OS: UBI8 and UBI9 with rootless variants.
Published image artifact details: https://github.com/marklogic/marklogic-docker, https://hub.docker.com/r/progressofficial/marklogic-db
@@ -204,8 +205,6 @@ The following environment variables are only useful when building and extending
| MARKLOGIC_PID_FILE | /var/run/MarkLogic.pid | no| n/a | The process ID file |
| MARKLOGIC_UMASK | 022 | no | n/a | The permissions granted to MarkLogic through umask |
-**IMPORTANT:** The use of [Docker secrets](https://docs.docker.com/engine/swarm/secrets/) is supported in the MarkLogic Docker image progressofficial/marklogic-db:10.0-7.3-centos-1.0.0-ea onwards and will not work with older versions of the Docker EA image. The Docker compose examples that follow use secrets. If you want to use these examples with an older version of the image, you need to update the examples to use environment variables instead of secrets.
-
## Configuring swap space
MarkLogic recommends that swap space be configured for production deployments to reduce the possibility of ‘out of memory’ errors. For more details, see [MarkLogic recommendations for swap space](https://help.marklogic.com/knowledgebase/article/View/21/19/swap-space-requirements) and [configuring "swappiness"](https://help.marklogic.com/Knowledgebase/Article/View/linux-swappiness).
@@ -985,9 +984,10 @@ The `marklogic` image tags allow the user to pin their applications to images fo
This tag points to the exact version of MarkLogic Server and the base OS. This allows an application to pin to a very specific version of the image and base OS (platform).
-Platform can be `centos`, `ubi` (RedHat Universal Base Image) or `ubi-rootless` (RedHat Universal Base Image for rootless containers). When `latest` tag is used, the platform will default to `ubi-rootless`.
+Platform can be `ubi`/`ubi9` (RedHat Universal Base Image) or `ubi-rootless`/`ubi9-rootless` (RedHat Universal Base Image for rootless containers). When `latest` tag is used, the platform will default to `ubi-rootless`.
+
-e.g. `11.2.0-centos` is the MarkLogic Server 11.2.0 release and CentOS base OS.
+e.g. `11.2.0-ubi9` is the MarkLogic Server 11.2.0 release and UBI9 base OS.
## `latest-xx.x`
@@ -1014,31 +1014,43 @@ It will pull the latest image and can cross patch, minor or major release number
**Note: The 'latest' images should not be used in production**
+# Container Runtime Detection
+Starting with version 11.2, MarkLogic is able to detect which container runtime the container is running in.
+## Docker Engine
+When running on Docker Engine the following entry will show up in the ErrorLogs.txt:
+`2024-03-15 08:27:36.136 Info: MarkLogic Server is running in a container using Docker runtime. A maximum of huge pages will be used if available.`
-# Known Issues and Limitations
+Where is calculated as described in the [Configuring HugePages](https://github.com/marklogic/marklogic-docker/pull/configuring-hugepages) section.
-## CentOS base docker image
+## Containerd Engine
-1. The image must be run in privileged mode. At the moment if the image isn't run as privileged many calls that use `sudo` during the supporting script will fail due to lack of required permissions as the image will not be able to create a user with the required permissions.
-2. Using the "leave" button in the Admin interface to remove a node from a cluster may not succeed, depending on your network configuration. Use the Management API to remove a node from a cluster. See: [https://docs.marklogic.com/REST/DELETE/admin/v1/host-config](https://docs.marklogic.com/REST/DELETE/admin/v1/host-config).
-3. Rejoining a node to a cluster, that had previously left that cluster, may not succeed.
-4. MarkLogic Server will default to the UTC timezone.
-5. The latest released version of CentOS 7 has known security vulnerabilities with respect to glib2 (CVE-2015-8387, CVE-2015-8390, CVE-2015-8394), glibc (CVE-2019-1010022), pcre (CVE-2015-8380, CVE-2015-8387, CVE-2015-8390, CVE-2015-8393, CVE-2015-8394), SQLite (CVE-2019-5827), nss (CVE-2014-3566), and bind-license (CVE-2023-6516, CVE-2023-5679, CVE-2023-5517, CVE-2023-50868, CVE-2023-50387, CVE-2023-4408). These libraries are included in the CentOS base image but, to-date, no fixes have been made available. Even though these libraries may be present in the base image that is used by MarkLogic Server, they are not used by MarkLogic Server itself, hence there is no impact or mitigation required.
+When running on Containerd Engine the following entry will show up in the ErrorLogs.txt:
+
+`2024-03-15 08:27:36.136 Info: MarkLogic Server is running in a container using Containerd runtime. A maximum of huge pages will be used if available.`
-## RedHat UBI base docker image
+Where is calculated as described in the [Configuring HugePages](https://github.com/marklogic/marklogic-docker/pull/configuring-hugepages) section.
+
+## CRI-O Engine
+
+When running on CRI-O Engine the following entry will show up in the ErrorLogs.txt:
+
+`2024-03-15 08:27:36.136 Info: MarkLogic Server is running in a container using CRI-O runtime. A maximum of huge pages will be used if available.`
+
+Where is calculated as described in the [Configuring HugePages](https://github.com/marklogic/marklogic-docker/pull/configuring-hugepages) section.
+
+# Known Issues and Limitations
1. The image must be run in privileged mode. If the image isn't run as privileged, the calls that use `sudo` in the startup script will fail due to lack of required permissions as the image will not be able to create a user with the required permissions. To run in non-privileged mode, use one of the “rootless” image options.
2. Using the "leave" button in the Admin interface to remove a node from a cluster may not succeed, depending on your network configuration. Use the Management API to remove a node from a cluster. See: [https://docs.marklogic.com/REST/DELETE/admin/v1/host-config](https://docs.marklogic.com/REST/DELETE/admin/v1/host-config).
3. Rejoining a node to a cluster, that had previously left that cluster, may not succeed.
4. MarkLogic Server will default to the UTC timezone.
-5. The latest released version of RedHat UBI 8 has known security vulnerabilities :
-- glibc (CVE-2019-1010022) for which RedHat does not consider to be a vulnerability.
-- kernel-headers (CVE-2023-6546).
-- pip (GHSA-gpvv-69j7-gwj8) and setuptools (GHSA-r9hx-vwmv-q579).
-- less (CVE-2024-32487).
+5. The latest released version of RedHat UBI images have known security vulnerabilities.
+ - CVE-2024-6602, CVE-2024-34397, CVE-2024-2236, CVE-2023-7207, CVE-2023-51764, CVE-2023-37920, CVE-2023-32636, CVE-2023-29499, CVE-2023-2650, CVE-2022-4899, CVE-2021-42694, CVE-2021-3997, CVE-2020-35512, CVE-2020-15945, CVE-2019-9937, CVE-2019-9936, CVE-2019-9705, CVE-2019-19244, CVE-2019-17543, CVE-2019-12904, CVE-2019-12900, CVE-2018-20839, CVE-2024-6602, CVE-2024-6119, CVE-2024-26462, CVE-2024-2236, CVE-2023-7207, CVE-2023-37920, CVE-2023-2953, CVE-2022-4899, CVE-2021-3997, CVE-2024-10041
+
+These libraries are included in the RedHat UBI base images but, to-date, no fixes have been made available. Even though these libraries may be present in the base image that is used by MarkLogic Server, they are not used by MarkLogic Server itself, hence there is no impact or mitigation required.
-These libraries are included in the RedHat UBI 8 base image but, to-date, no fixes have been made available. Even though these libraries may be present in the base image that is used by MarkLogic Server, they are not used by MarkLogic Server itself, hence there is no impact or mitigation required.
+6. As part of the hardening process, the following packages are removed from the image: `vim-minimal`, `cups-client`, `cups-libs`, `tar`, `python3-pip-wheel`, `platform-python`, `python3-libs`, `platform-python-setuptools`, `avahi-libs`, `binutils`, `expat`, `libarchive`, `python3`, `python3-libs`, `python-unversioned-command`. These packages are not required for the operation of MarkLogic Server and are removed to reduce the attack surface of the image. If you require any of these packages, you can install them in your own Dockerfile.
diff --git a/dockerFiles/marklogic-deps-centos:base b/dockerFiles/marklogic-deps-centos:base
deleted file mode 100644
index 029adf0..0000000
--- a/dockerFiles/marklogic-deps-centos:base
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################
-#
-# Copyright (c) 2023 MarkLogic Corporation
-#
-###############################################################
-
-FROM centos:centos7
-LABEL "com.marklogic.maintainer"="docker@marklogic.com"
-
-###############################################################
-# install networking, base deps and tzdata for timezone
-###############################################################
-
-RUN echo "NETWORKING=yes" > /etc/sysconfig/network \
- && yum -y update \
- && yum -y install gdb.x86_64 glibc.i686 libstdc++.i686 libgcc.i686 initscripts redhat-lsb-core.x86_64 tzdata xz-0:5.2.2-2.el7_9.x86_64 \
- && yum clean all
diff --git a/dockerFiles/marklogic-deps-ubi9:base b/dockerFiles/marklogic-deps-ubi9:base
new file mode 100644
index 0000000..25ab4ed
--- /dev/null
+++ b/dockerFiles/marklogic-deps-ubi9:base
@@ -0,0 +1,31 @@
+###############################################################
+#
+# Copyright (c) 2023 MarkLogic Corporation
+#
+###############################################################
+
+FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4-1227.1726694542
+LABEL "com.marklogic.maintainer"="docker@marklogic.com"
+
+###############################################################
+# install libnsl rpm package
+###############################################################
+
+RUN microdnf -y update \
+ && curl -Lso libnsl.rpm https://bed-artifactory.bedford.progress.com:443/artifactory/ml-rpm-release-tierpoint/devdependencies/libnsl-2.34-100.el9_4.4.x86_64.rpm \
+ && rpm -i libnsl.rpm \
+ && rm -f libnsl.rpm
+
+###############################################################
+# install networking, base deps and tzdata for timezone
+###############################################################
+# hadolint ignore=DL3006
+RUN echo "NETWORKING=yes" > /etc/sysconfig/network \
+ && microdnf -y install --setopt install_weak_deps=0 gdb nss libtool-ltdl cpio tzdata util-linux \
+ && microdnf clean all
+
+
+###############################################################
+# Enable FIPS Mode
+###############################################################
+RUN update-crypto-policies --set FIPS
\ No newline at end of file
diff --git a/dockerFiles/marklogic-deps-ubi:base b/dockerFiles/marklogic-deps-ubi:base
index b6f2b99..e74fdbb 100644
--- a/dockerFiles/marklogic-deps-ubi:base
+++ b/dockerFiles/marklogic-deps-ubi:base
@@ -4,23 +4,28 @@
#
###############################################################
-FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9-1161.1715068733
+FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1086
LABEL "com.marklogic.maintainer"="docker@marklogic.com"
###############################################################
# install libnsl rpm package
###############################################################
-RUN microdnf install -y wget \
- && microdnf -y update \
- && wget --quiet https://bed-artifactory.bedford.progress.com:443/artifactory/ml-rpm-release-tierpoint/devdependencies/libnsl-2.28-251.el8_10.2.x86_64.rpm \
- && rpm -i libnsl-2.28-251.el8_10.2.x86_64.rpm \
- && rm libnsl-2.28-251.el8_10.2.x86_64.rpm
+RUN microdnf -y update \
+ && curl -Lso libnsl.rpm https://bed-artifactory.bedford.progress.com:443/artifactory/ml-rpm-release-tierpoint/devdependencies/libnsl-2.28-251.el8_10.5.x86_64.rpm \
+ && rpm -i libnsl.rpm \
+ && rm -f libnsl.rpm
###############################################################
# install networking, base deps and tzdata for timezone
###############################################################
# hadolint ignore=DL3006
RUN echo "NETWORKING=yes" > /etc/sysconfig/network \
- && microdnf -y install gdb.x86_64 glibc.i686 libstdc++.i686 libgcc.i686 initscripts redhat-lsb-core.x86_64 tzdata \
+ && microdnf -y install --setopt install_weak_deps=0 gdb redhat-lsb-core initscripts tzdata \
&& microdnf clean all
+
+
+###############################################################
+# Enable FIPS Mode
+###############################################################
+RUN update-crypto-policies --set FIPS
\ No newline at end of file
diff --git a/dockerFiles/marklogic-server-centos:base b/dockerFiles/marklogic-server-centos:base
deleted file mode 100644
index 65713dc..0000000
--- a/dockerFiles/marklogic-server-centos:base
+++ /dev/null
@@ -1,124 +0,0 @@
-###############################################################
-#
-# Copyright (c) 2023 MarkLogic Corporation
-#
-###############################################################
-
-ARG BASE_IMAGE=marklogic-centos/marklogic-deps-centos:10-internal
-FROM ${BASE_IMAGE} as builder
-
-###############################################################
-# set build args
-###############################################################
-
-ARG ML_RPM=marklogic.rpm
-ARG ML_USER="marklogic_user"
-ARG ML_VERSION=10-internal
-ARG ML_CONVERTERS=marklogic.converters
-####################################################
-# inject init, start and clustering scripts
-###############################################################
-
-COPY scripts/start-marklogic.sh /usr/local/bin/start-marklogic.sh
-
-###############################################################
-# install MarkLogic server, sudo, and remove mlcmd packages
-###############################################################
-COPY ${ML_RPM} /tmp/marklogic-server.rpm
-RUN yum localinstall -y /tmp/marklogic-server.rpm \
- && rm /tmp/marklogic-server.rpm \
- && yum -y install sudo \
- && yum -y clean all \
- && rm -rf ./opt/MarkLogic/mlcmd/lib/* \
- && rm -rf ./opt/MarkLogic/mlcmd/ext/*
-
-###############################################################
-# Add TINI to serve as PID 1 process
-###############################################################
-ENV TINI_VERSION v0.19.0
-ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
-RUN chmod +x /tini
-
-###############################################################
-# Copy converters package
-###############################################################
-WORKDIR /
-COPY ${ML_CONVERTERS} converters.rpm
-###############################################################
-# create system user
-###############################################################
-
-RUN adduser --gid users --uid 1000 ${ML_USER} && echo ${ML_USER}" ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
-
-###############################################################
-# second stage for flattening layers
-###############################################################
-FROM ${BASE_IMAGE}
-
-COPY --from=builder / /
-
-ARG ML_USER="marklogic_user"
-ARG ML_VERSION=10-internal
-ARG ML_DOCKER_VERSION=local
-ARG BUILD_BRANCH=local
-
-###############################################################
-# define docker labels
-###############################################################
-
-LABEL "com.marklogic.maintainer"="docker@marklogic.com"
-LABEL "com.marklogic.name"="MarkLogic Server ${ML_VERSION}"
-LABEL "com.marklogic.docker-version"="${ML_DOCKER_VERSION}"
-LABEL "com.marklogic.release-version"="${ML_VERSION}"
-LABEL "com.marklogic.build-branch"="${BUILD_BRANCH}"
-LABEL "com.marklogic"="MarkLogic"
-LABEL "com.marklogic.release-type"="production"
-LABEL "com.marklogic.license"="MarkLogic EULA"
-LABEL "com.marklogic.license.description"="By subscribing to this product, you agree to the terms and conditions outlined in MarkLogic's End User License Agreement (EULA) here https://developer.marklogic.com/eula "
-LABEL "com.marklogic.license.url"="https://developer.marklogic.com/eula"
-LABEL "com.marklogic.description"="MarkLogic is the only Enterprise NoSQL database. It is a new generation database built with a flexible data model to store, manage, and search JSON, XML, RDF, and more - without sacrificing enterprise features such as ACID transactions, certified security, backup, and recovery. With these capabilities, MarkLogic is ideally suited for making heterogeneous data integration simpler and faster, and for delivering dynamic content at massive scale. The current release of the MarkLogic Server Developer Docker image includes all features and is limited to developer use."
-LABEL docker.cmd="docker run -it -p 7997-8010:7997-8010 -e MARKLOGIC_INIT=true -e MARKLOGIC_ADMIN_USERNAME= -e MARKLOGIC_ADMIN_PASSWORD= --mount src=MarkLogic,dst=/var/opt/MarkLogic progressofficial/marklogic-db:${ML_VERSION}"
-
-
-###############################################################
-# set env vars
-###############################################################
-
-ENV MARKLOGIC_INSTALL_DIR=/opt/MarkLogic \
- MARKLOGIC_DATA_DIR=/var/opt/MarkLogic \
- MARKLOGIC_USER=${ML_USER} \
- MARKLOGIC_PID_FILE=/var/run/MarkLogic.pid \
- MARKLOGIC_UMASK=022 \
- LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH:/opt/MarkLogic/lib \
- MARKLOGIC_VERSION="${ML_VERSION}" \
- MARKLOGIC_DOCKER_VERSION="${ML_DOCKER_VERSION}" \
- MARKLOGIC_BOOTSTRAP_HOST=bootstrap \
- MARKLOGIC_ADMIN_USERNAME_FILE=mldb_admin_user \
- MARKLOGIC_ADMIN_PASSWORD_FILE=mldb_password_user \
- MARKLOGIC_WALLET_PASSWORD_FILE=mldb_wallet_password \
- BUILD_BRANCH=${BUILD_BRANCH} \
- MARKLOGIC_JOIN_TLS_ENABLED=false
-
-
-###############################################################
-# expose MarkLogic server ports
-###############################################################
-
-EXPOSE 25 7997-8010
-
-###############################################################
-# set system user
-###############################################################
-
-USER ${ML_USER}
-
-###############################################################
-# define volume for persistent MarkLogic server data
-###############################################################
-
-VOLUME /var/opt/MarkLogic
-
-###############################################################
-# set entrypoint
-###############################################################
-ENTRYPOINT ["/tini", "--", "/usr/local/bin/start-marklogic.sh"]
diff --git a/dockerFiles/marklogic-server-ubi-rootless:base b/dockerFiles/marklogic-server-ubi-rootless:base
index 30a3439..7706a5e 100644
--- a/dockerFiles/marklogic-server-ubi-rootless:base
+++ b/dockerFiles/marklogic-server-ubi-rootless:base
@@ -5,7 +5,7 @@
###############################################################
ARG BASE_IMAGE=marklogic-ubi/marklogic-deps-ubi:11-internal
-FROM ${BASE_IMAGE} as builder
+FROM ${BASE_IMAGE} AS builder
###############################################################
# set build args
@@ -13,21 +13,15 @@ FROM ${BASE_IMAGE} as builder
ARG ML_RPM=marklogic.rpm
ARG ML_USER="marklogic_user"
-ARG ML_VERSION=10-internal
+ARG ML_VERSION=11-internal
ARG ML_CONVERTERS=marklogic.converters
###############################################################
# create system user
###############################################################
-RUN adduser --gid users --uid 1000 ${ML_USER}
-
-###############################################################
-# Copy converters package
-###############################################################
-WORKDIR /
-COPY ${ML_CONVERTERS} /tmp/converters.rpm
-RUN chown ${ML_USER}:users /tmp/converters.rpm
+RUN adduser --gid users --uid 1000 ${ML_USER} \
+ && chmod 740 -R /home/${ML_USER}
####################################################
# inject init, start and clustering scripts and set permission
@@ -51,7 +45,7 @@ RUN rpm -i /tmp/marklogic-server.rpm \
# set /opt/MarkLogic authorisation
###############################################################
RUN chown -R ${ML_USER}:users /opt/MarkLogic \
- && chmod 766 -R /opt/MarkLogic
+ && chmod 750 -R /opt/MarkLogic
###############################################################
# set marklogic.conf authorisation
@@ -64,7 +58,7 @@ RUN touch /etc/marklogic.conf \
###############################################################
# Add TINI to serve as PID 1 process
###############################################################
-ENV TINI_VERSION v0.19.0
+ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chown ${ML_USER}:users /tini \
&& chmod +x /tini
@@ -80,6 +74,8 @@ ARG ML_USER="marklogic_user"
ARG ML_VERSION=10-internal
ARG ML_DOCKER_VERSION=local
ARG BUILD_BRANCH=local
+ARG ML_DOCKER_TYPE=ubi
+ARG ML_CONVERTERS=marklogic.converters
###############################################################
# define docker labels
@@ -101,7 +97,7 @@ LABEL docker.cmd="docker run -it -p 7997-8010:7997-8010 -e MARKLOGIC_INIT=true -
###############################################################
# copy notice file
###############################################################
-COPY NOTICE.txt /home/${ML_USER}/NOTICE.txt
+COPY --chown=${ML_USER}:users NOTICE.txt /home/${ML_USER}/NOTICE.txt
###############################################################
# set env vars
@@ -115,6 +111,7 @@ ENV MARKLOGIC_INSTALL_DIR=/opt/MarkLogic \
LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH:/opt/MarkLogic/lib \
MARKLOGIC_VERSION="${ML_VERSION}" \
MARKLOGIC_DOCKER_VERSION="${ML_DOCKER_VERSION}" \
+ MARKLOGIC_IMAGE_TYPE="$ML_DOCKER_TYPE" \
MARKLOGIC_BOOTSTRAP_HOST=bootstrap \
MARKLOGIC_ADMIN_USERNAME_FILE=mldb_admin_user \
MARKLOGIC_ADMIN_PASSWORD_FILE=mldb_password_user \
@@ -137,7 +134,30 @@ RUN microdnf -y reinstall tzdata
RUN mkdir -p ${MARKLOGIC_DATA_DIR} \
&& chown -R ${ML_USER} ${MARKLOGIC_DATA_DIR} \
- && chmod 764 -R ${MARKLOGIC_DATA_DIR}
+ && chmod 750 -R ${MARKLOGIC_DATA_DIR}
+
+###############################################################
+# run open scap hardening script
+###############################################################
+
+COPY rhel-script-cis.sh /tmp/rhel-script-cis.sh
+RUN touch /.dockerenv \
+ && chmod +x /tmp/rhel-script-cis.sh \
+ && /tmp/rhel-script-cis.sh
+
+###############################################################
+# Copy converters package
+###############################################################
+WORKDIR /
+COPY ${ML_CONVERTERS} /tmp/converters.rpm
+RUN chown ${ML_USER}:users /tmp/converters.rpm
+
+###############################################################
+# Remove optional packages that have known vulnerabilities
+###############################################################
+RUN for package in vim-minimal cups-client cups-libs tar python3-pip-wheel platform-python python3-libs platform-python-setuptools avahi-libs binutils expat libarchive python3 python3-libs python-unversioned-command; \
+ do rpm -e --nodeps $package || true; \
+ done;
###############################################################
# expose MarkLogic server ports
diff --git a/dockerFiles/marklogic-server-ubi:base b/dockerFiles/marklogic-server-ubi:base
index 0b1033a..b7f7acf 100644
--- a/dockerFiles/marklogic-server-ubi:base
+++ b/dockerFiles/marklogic-server-ubi:base
@@ -5,7 +5,7 @@
###############################################################
ARG BASE_IMAGE=marklogic-ubi/marklogic-deps-ubi:11-internal
-FROM ${BASE_IMAGE} as builder
+FROM ${BASE_IMAGE} AS builder
###############################################################
# set build args
@@ -13,7 +13,7 @@ FROM ${BASE_IMAGE} as builder
ARG ML_RPM=marklogic.rpm
ARG ML_USER="marklogic_user"
-ARG ML_VERSION=10-internal
+ARG ML_VERSION=11-internal
ARG ML_CONVERTERS=marklogic.converters
####################################################
# inject init, start and clustering scripts
@@ -27,7 +27,7 @@ COPY scripts/start-marklogic.sh /usr/local/bin/start-marklogic.sh
COPY ${ML_RPM} /tmp/marklogic-server.rpm
RUN rpm -i /tmp/marklogic-server.rpm \
&& rm /tmp/marklogic-server.rpm \
- && microdnf -y install sudo \
+ && microdnf -y install --setopt install_weak_deps=0 sudo \
&& microdnf -y clean all \
&& rm -rf ./opt/MarkLogic/mlcmd/lib/* \
&& rm -rf ./opt/MarkLogic/mlcmd/ext/*
@@ -35,7 +35,7 @@ RUN rpm -i /tmp/marklogic-server.rpm \
###############################################################
# Add TINI to serve as PID 1 process
###############################################################
-ENV TINI_VERSION v0.19.0
+ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
@@ -48,7 +48,8 @@ COPY ${ML_CONVERTERS} converters.rpm
# create system user
###############################################################
-RUN adduser --gid users --uid 1000 ${ML_USER} && echo ${ML_USER}" ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
+RUN adduser --gid users --uid 1000 ${ML_USER} \
+ && echo ${ML_USER}" ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
###############################################################
# second stage for flattening layers
@@ -61,6 +62,7 @@ ARG ML_USER="marklogic_user"
ARG ML_VERSION=10-internal
ARG ML_DOCKER_VERSION=local
ARG BUILD_BRANCH=local
+ARG ML_DOCKER_TYPE=ubi
###############################################################
# define docker labels
###############################################################
@@ -81,7 +83,7 @@ LABEL docker.cmd="docker run -it -p 7997-8010:7997-8010 -e MARKLOGIC_INIT=true -
###############################################################
# copy notice file
###############################################################
-COPY NOTICE.txt /home/${ML_USER}/NOTICE.txt
+COPY --chown=${ML_USER}:users NOTICE.txt /home/${ML_USER}/NOTICE.txt
###############################################################
# set env vars
@@ -95,6 +97,7 @@ ENV MARKLOGIC_INSTALL_DIR=/opt/MarkLogic \
LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH:/opt/MarkLogic/lib \
MARKLOGIC_VERSION="${ML_VERSION}" \
MARKLOGIC_DOCKER_VERSION="${ML_DOCKER_VERSION}" \
+ MARKLOGIC_IMAGE_TYPE="$ML_DOCKER_TYPE" \
MARKLOGIC_BOOTSTRAP_HOST=bootstrap \
MARKLOGIC_ADMIN_USERNAME_FILE=mldb_admin_user \
MARKLOGIC_ADMIN_PASSWORD_FILE=mldb_password_user \
@@ -108,6 +111,13 @@ ENV MARKLOGIC_INSTALL_DIR=/opt/MarkLogic \
RUN microdnf -y reinstall tzdata
+###############################################################
+# Remove optional packages that have known vulnerabilities
+###############################################################
+RUN for package in vim-minimal cups-client cups-libs tar python3-pip-wheel platform-python python3-libs platform-python-setuptools avahi-libs binutils expat libarchive python3 python3-libs python-unversioned-command; \
+ do rpm -e --nodeps $package || true; \
+ done;
+
###############################################################
# expose MarkLogic server ports
###############################################################
@@ -136,4 +146,4 @@ VOLUME /var/opt/MarkLogic
###############################################################
# set entrypoint
###############################################################
-ENTRYPOINT ["/tini", "--", "/usr/local/bin/start-marklogic.sh"]
\ No newline at end of file
+ENTRYPOINT ["/tini", "--", "/usr/local/bin/start-marklogic.sh"]
diff --git a/src/scripts/start-marklogic-rootless.sh b/src/scripts/start-marklogic-rootless.sh
index b5ccd72..b58eddd 100755
--- a/src/scripts/start-marklogic-rootless.sh
+++ b/src/scripts/start-marklogic-rootless.sh
@@ -40,7 +40,8 @@ rm -f /var/opt/MarkLogic/ready
###############################################################
# Prepare script
###############################################################
-info "Starting container with MarkLogic $MARKLOGIC_VERSION and Docker script version $MARKLOGIC_DOCKER_VERSION built from $BUILD_BRANCH branch."
+info "Starting container with MarkLogic Server."
+info "| server ver: $MARKLOGIC_VERSION | scripts ver: $MARKLOGIC_DOCKER_VERSION | image type: $MARKLOGIC_IMAGE_TYPE | branch: $BUILD_BRANCH |"
cd ~ || exit
# Convert booleans to lowercase
for var in OVERWRITE_ML_CONF INSTALL_CONVERTERS MARKLOGIC_DEV_BUILD MARKLOGIC_INIT MARKLOGIC_JOIN_CLUSTER MARKLOGIC_JOIN_TLS_ENABLED; do
@@ -283,8 +284,12 @@ if [[ "${MARKLOGIC_DEV_BUILD}" == "true" ]]; then
info "MARKLOGIC_DEV_BUILD is true, starting build using ${MARKLOGIC_INSTALL_DIR}/MarkLogic"
"${MARKLOGIC_INSTALL_DIR}/MarkLogic" -i . -d "${MARKLOGIC_DATA_DIR}" -p "${MARKLOGIC_PID_FILE}" &
elif [[ -z "${MARKLOGIC_DEV_BUILD}" ]] || [[ "${MARKLOGIC_DEV_BUILD}" == "false" ]]; then
- # service MarkLogic start
- /etc/init.d/MarkLogic start
+ # Choose between init.d and systemd based on the presence of the init.d script
+ if [[ -e /etc/init.d/MarkLogic ]]; then
+ /etc/init.d/MarkLogic start
+ else
+ /etc/MarkLogic/MarkLogic-service.sh start
+ fi
else
error "MARKLOGIC_DEV_BUILD must be true or false." exit
fi
diff --git a/src/scripts/start-marklogic.sh b/src/scripts/start-marklogic.sh
index 85e6044..caf2dbd 100755
--- a/src/scripts/start-marklogic.sh
+++ b/src/scripts/start-marklogic.sh
@@ -40,7 +40,8 @@ sudo rm -f /var/opt/MarkLogic/ready
###############################################################
# Prepare script
###############################################################
-info "Starting container with MarkLogic $MARKLOGIC_VERSION and Docker script version $MARKLOGIC_DOCKER_VERSION built from $BUILD_BRANCH branch."
+info "Starting container with MarkLogic Server."
+info "| server ver: $MARKLOGIC_VERSION | scripts ver: $MARKLOGIC_DOCKER_VERSION | image type: $MARKLOGIC_IMAGE_TYPE | branch: $BUILD_BRANCH |"
cd ~ || exit
# Convert booleans to lowercase
for var in OVERWRITE_ML_CONF INSTALL_CONVERTERS MARKLOGIC_DEV_BUILD MARKLOGIC_INIT MARKLOGIC_JOIN_CLUSTER MARKLOGIC_JOIN_TLS_ENABLED; do
@@ -307,7 +308,12 @@ if [[ "${MARKLOGIC_DEV_BUILD}" == "true" ]]; then
info "MARKLOGIC_DEV_BUILD is true, starting build using ${MARKLOGIC_INSTALL_DIR}/MarkLogic"
sudo "${MARKLOGIC_INSTALL_DIR}/MarkLogic" -i . -d "${MARKLOGIC_DATA_DIR}" -p "${MARKLOGIC_PID_FILE}" &
elif [[ -z "${MARKLOGIC_DEV_BUILD}" ]] || [[ "${MARKLOGIC_DEV_BUILD}" == "false" ]]; then
- sudo /etc/init.d/MarkLogic start
+ # Choose between init.d and systemd based on the presence of the init.d script
+ if [[ -e /etc/init.d/MarkLogic ]]; then
+ sudo /etc/init.d/MarkLogic start
+ else
+ sudo /etc/MarkLogic/MarkLogic-service.sh start
+ fi
else
error "MARKLOGIC_DEV_BUILD must be true or false." exit
fi
diff --git a/test/docker-tests.robot b/test/docker-tests.robot
index 975185c..57fcafe 100644
--- a/test/docker-tests.robot
+++ b/test/docker-tests.robot
@@ -10,7 +10,8 @@ Uninitialized MarkLogic container
Create container with -e MARKLOGIC_INIT=false
Docker log should contain *MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
Docker log should contain *MARKLOGIC_INIT is set to false or not defined, not initializing.*
- Docker log should contain *Starting container with MarkLogic ${MARKLOGIC_VERSION} and Docker script version ${MARKLOGIC_DOCKER_VERSION} built from ${BUILD_BRANCH} branch.*
+ Docker log should contain *Starting container with MarkLogic Server.*
+ Docker log should contain *| server ver: ${MARKLOGIC_VERSION} | scripts ver: ${MARKLOGIC_DOCKER_VERSION} | image type: ${IMAGE_TYPE} | branch: ${BUILD_BRANCH} |*
Verify response for unauthenticated request with 8000 *Forbidden*
Verify response for unauthenticated request with 8001 *This server must now self-install the initial databases and application servers. Click OK to continue.*
Verify response for unauthenticated request with 8002 *Forbidden*
@@ -23,7 +24,8 @@ Uninitialized MarkLogic container no parameters
Create container with
Docker log should contain *MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
Docker log should contain *MARKLOGIC_INIT is set to false or not defined, not initializing.*
- Docker log should contain *Starting container with MarkLogic ${MARKLOGIC_VERSION} and Docker script version ${MARKLOGIC_DOCKER_VERSION} built from ${BUILD_BRANCH} branch.*
+ Docker log should contain *Starting container with MarkLogic Server.*
+ Docker log should contain *| server ver: ${MARKLOGIC_VERSION} | scripts ver: ${MARKLOGIC_DOCKER_VERSION} | image type: ${IMAGE_TYPE} | branch: ${BUILD_BRANCH} |*
Verify response for unauthenticated request with 8000 *Forbidden*
Verify response for unauthenticated request with 8001 *This server must now self-install the initial databases and application servers. Click OK to continue.*
Verify response for unauthenticated request with 8002 *Forbidden*
@@ -38,7 +40,8 @@ Initialized MarkLogic container
... -e MARKLOGIC_ADMIN_PASSWORD=${DEFAULT ADMIN PASS}
Docker log should contain *MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
Docker log should contain *MARKLOGIC_INIT is true, initializing the MarkLogic server.*
- Docker log should contain *Starting container with MarkLogic ${MARKLOGIC_VERSION} and Docker script version ${MARKLOGIC_DOCKER_VERSION} built from ${BUILD_BRANCH} branch.*
+ Docker log should contain *Starting container with MarkLogic Server.*
+ Docker log should contain *| server ver: ${MARKLOGIC_VERSION} | scripts ver: ${MARKLOGIC_DOCKER_VERSION} | image type: ${IMAGE_TYPE} | branch: ${BUILD_BRANCH} |*
Verify response for unauthenticated request with 8000 *Unauthorized*
Verify response for unauthenticated request with 8001 *Unauthorized*
Verify response for unauthenticated request with 8002 *Unauthorized*
@@ -48,13 +51,14 @@ Initialized MarkLogic container
[Teardown] Delete container
Upgrade MarkLogic container
- Skip If '${IMAGE_TYPE}' == 'ubi-rootless' msg = Skipping Upgrade MarkLogic test for ubi-rootless image
+ Skip If 'rootless' in '${IMAGE_TYPE}' msg = Skipping Upgrade MarkLogic test for rootless image
Create test container with -e MARKLOGIC_INIT=true
... -e MARKLOGIC_ADMIN_USERNAME=${DEFAULT ADMIN USER}
... -e MARKLOGIC_ADMIN_PASSWORD=${DEFAULT ADMIN PASS}
Docker log should contain *MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
Docker log should contain *MARKLOGIC_INIT is true, initializing the MarkLogic server.*
- Docker log should contain *Starting container with MarkLogic ${MARKLOGIC_VERSION} and Docker script version ${MARKLOGIC_DOCKER_VERSION} built from ${BUILD_BRANCH} branch.*
+ Docker log should contain *Starting container with MarkLogic Server.*
+ Docker log should contain *| server ver: ${MARKLOGIC_VERSION} | scripts ver: ${MARKLOGIC_DOCKER_VERSION} | image type: ${IMAGE_TYPE} | branch: ${BUILD_BRANCH} |*
Verify response for unauthenticated request with 8000 *Unauthorized*
Verify response for unauthenticated request with 8001 *Unauthorized*
Verify response for unauthenticated request with 8002 *Unauthorized*
@@ -76,7 +80,7 @@ Initialized MarkLogic container with admin password containing special character
... -e MARKLOGIC_ADMIN_PASSWORD=${SPEC CHARS ADMIN PASS}
Docker log should contain *MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
Docker log should contain *MARKLOGIC_INIT is true, initializing the MarkLogic server.*
- Docker log should contain *Starting container with MarkLogic ${MARKLOGIC_VERSION} and Docker script version ${MARKLOGIC_DOCKER_VERSION} built from ${BUILD_BRANCH} branch.*
+ Docker log should contain *| server ver: ${MARKLOGIC_VERSION} | scripts ver: ${MARKLOGIC_DOCKER_VERSION} | image type: ${IMAGE_TYPE} | branch: ${BUILD_BRANCH} |*
Verify response for unauthenticated request with 8000 *Unauthorized*
Verify response for unauthenticated request with 8001 *Unauthorized*
Verify response for unauthenticated request with 8002 *Unauthorized*
@@ -140,7 +144,7 @@ Initialized MarkLogic container with config overrides
... -e TZ=America/Los_Angeles
... -e MARKLOGIC_ADMIN_USERNAME=${DEFAULT ADMIN USER}
... -e MARKLOGIC_ADMIN_PASSWORD=${DEFAULT ADMIN PASS}
- IF '${IMAGE_TYPE}' != 'ubi-rootless'
+ IF 'rootless' not in '${IMAGE_TYPE}'
Docker log should contain *OVERWRITE_ML_CONF is true, deleting existing /etc/marklogic.conf and overwriting with ENV variables.*
Docker log should contain *TZ is defined, setting timezone to America/Los_Angeles.*
END
@@ -166,7 +170,7 @@ Single node compose example
Verify response for authenticated request with 8001 *No license key has been entered*
Verify response for authenticated request with 8002 *Monitoring Dashboard*
Host count on port 8002 should be 1
- IF '${IMAGE_TYPE}' != 'ubi-rootless'
+ IF 'rootless' not in '${IMAGE_TYPE}'
Compose logs should contain ${compose test file} *TZ is defined, setting timezone to Europe/Prague.*
END
Verify container timezone Europe/Prague
@@ -308,7 +312,7 @@ Single node compose example with bootstrap node joining trying to itself
Verify response for authenticated request with 7100 *Query Console*
Verify response for authenticated request with 7101 *No license key has been entered*
Verify response for authenticated request with 7102 *Monitoring Dashboard*
- IF '${IMAGE_TYPE}' != 'ubi-rootless'
+ IF 'rootless' not in '${IMAGE_TYPE}'
Compose logs should contain ${compose test file} *bootstrap*TZ is defined, setting timezone to America/Los_Angeles.*
END
Compose logs should contain ${compose test file} *bootstrap*MARKLOGIC_ADMIN_PASSWORD is set, using ENV for admin password.*
@@ -328,13 +332,13 @@ Two node compose example with incorrect bootstrap host name
Verify response for authenticated request with 7100 *Query Console*
Verify response for authenticated request with 7101 *No license key has been entered*
Verify response for authenticated request with 7102 *Monitoring Dashboard*
- IF '${IMAGE_TYPE}' != 'ubi-rootless'
+ IF 'rootless' not in '${IMAGE_TYPE}'
Compose logs should contain ${compose test file} *bootstrap*TZ is defined, setting timezone to America/Los_Angeles.*
END
Compose logs should contain ${compose test file} *bootstrap*MARKLOGIC_ADMIN_PASSWORD is set, using ENV for admin password.*
Compose logs should contain ${compose test file} *bootstrap*MARKLOGIC_INIT is true, initializing the MarkLogic server.*
Compose logs should contain ${compose test file} *bootstrap*MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
- IF '${IMAGE_TYPE}' != 'ubi-rootless'
+ IF 'rootless' not in '${IMAGE_TYPE}'
Compose logs should contain ${compose test file} *node2*TZ is defined, setting timezone to America/Los_Angeles.*
END
Compose logs should contain ${compose test file} *node2*MARKLOGIC_ADMIN_PASSWORD is set, using ENV for admin password.*
@@ -368,7 +372,7 @@ Two node compose with credentials in env and verify restart logic
Compose logs should contain ${compose test file} *bootstrap*MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.*
Verify container timezone America/Los_Angeles port=7100
Verify container timezone America/Los_Angeles port=7200
- IF '${IMAGE_TYPE}' != 'ubi-rootless'
+ IF 'rootless' not in '${IMAGE_TYPE}'
Compose logs should contain ${compose test file} *bootstrap*TZ is defined, setting timezone to America/Los_Angeles.*
Compose logs should contain ${compose test file} *node2*TZ is defined, setting timezone to America/Los_Angeles.*
END
diff --git a/test/keywords.resource b/test/keywords.resource
index 4dc24d5..2baf6a5 100644
--- a/test/keywords.resource
+++ b/test/keywords.resource
@@ -11,14 +11,14 @@ Library DateTime
${DEFAULT ADMIN USER} test_admin
${DEFAULT ADMIN PASS} test_admin_pass
${SPEC CHARS ADMIN PASS} Admin@2$s%^&*!
-${TEST_IMAGE} %{DOCKER_TEST_IMAGE=marklogic/marklogic-server-centos:internal}
+${TEST_IMAGE} %{DOCKER_TEST_IMAGE=marklogic/marklogic-server-ubi:internal}
${UPGRADE_TEST_IMAGE} marklogic/marklogic-server-ubi:internal
${DOCKER TIMEOUT} 240s
${LICENSE KEY} %{QA_LICENSE_KEY=none}
${LICENSEE} MarkLogic - Version 9 QA Test License
${MARKLOGIC_VERSION} internal
${BUILD_BRANCH} local
-${IMAGE_TYPE} centos
+${IMAGE_TYPE} ubi
${VOL_NAME} MarkLogic_vol_1
${VOL_INFO} src=${VOL_NAME},dst=/var/opt/MarkLogic
diff --git a/test/structure-test.yaml b/test/structure-test.yaml
index b1dec56..2e44f77 100644
--- a/test/structure-test.yaml
+++ b/test/structure-test.yaml
@@ -62,4 +62,6 @@ fileExistenceTests:
shouldExist: true
- name: 'MarkLogic notice file'
path: '/home/marklogic_user/NOTICE.txt'
- shouldExist: true
\ No newline at end of file
+ shouldExist: true
+ uid: 1000
+ gid: 100
\ No newline at end of file