Compare commits

...

36 Commits

Author SHA1 Message Date
Sonatype 450f668946 Update Repository Manager to 3.19.0-01. 2019-09-30 17:44:08 +00:00
Sonatype 3e44657f5e Update Repository Manager to 3.18.1-01. 2019-08-09 15:47:12 +00:00
Adam Boesch 37a9fcd2b9 NEXUS-20366 - Use UBI8 instead of CentOS (#111) 2019-07-26 15:31:49 -04:00
Sonatype 0f4ff59f0b Update Repository Manager to 3.18.0-01. 2019-07-26 17:15:07 +00:00
Rich Seddon a1f0ab750d Update README.md
Added a note that our system requirements should be taken into account when provisioning the docker container.
2019-07-12 15:10:43 -05:00
Sonatype 907d39d806 Update Repository Manager to 3.17.0-01. 2019-06-24 20:33:45 +00:00
Matthew Piggott bd57ceec2a Remove references to old default password 2019-06-17 14:05:47 -04:00
Joe Tom a318fa893c trivial clarify 2019-06-13 11:32:47 -04:00
Sonatype 706e45b5b0 Update Repository Manager to 3.16.2-01. 2019-05-31 20:04:22 +00:00
Matthew Piggott 54894fcec3 Specify chef version 14.12.9 (#109) 2019-05-31 16:01:08 -04:00
Sonatype 451c0c1c36 Update Repository Manager to 3.16.1-02. 2019-04-16 19:41:08 +00:00
Sonatype d180fb611d Update Repository Manager to 3.16.0-01. 2019-04-11 19:36:18 +00:00
bigspotteddog c770722970 Use openjdk. 2019-02-12 17:49:11 -08:00
Sonatype c75f2c4c2a Update Repository Manager to 3.15.2-01. Update Repository Manager Cookbook to release-0.5.20190212-155606.d1afdfe. 2019-02-13 01:21:48 +00:00
Sonatype 318f53548b Update Repository Manager to 3.15.2-01. 2019-01-29 12:52:08 +00:00
Dawid Sawa 7f8dca3509 Switchover to OpenJDK (#105) 2019-01-28 11:46:03 +00:00
Sonatype cad92467b0 Update Repository Manager to 3.15.1-01. Update Oracle JRE to 8u202-b08. 2019-01-18 05:39:05 +00:00
Sonatype f52169d41c Update Repository Manager to 3.15.0-01. 2019-01-14 16:51:37 +00:00
Sonatype 11cff03638 Update Repository Manager Cookbook to release-0.5.20180828-231916.863899c. Update Oracle JRE to 8u192-b12. 2018-10-16 22:13:42 +00:00
Sonatype 13a8d3d22f Update Repository Manager to 3.14.0-04. 2018-10-12 16:41:34 +00:00
Sonatype 78867e3c6c Update Repository Manager Cookbook to release-0.5.20180828-161555.3c23098. 2018-08-28 23:32:49 +00:00
Sonatype 0e272c92e1 Update Repository Manager to 3.13.0-01. 2018-07-19 19:24:48 +00:00
Sonatype ce488a2cbd Update Repository Manager Cookbook to release-0.5.20180717-185554.2346ca8. Update Oracle JRE to 8u181-b13. 2018-07-17 19:05:29 +00:00
Sonatype 6a1cc21a6e Update Repository Manager to 3.12.1-01. 2018-06-11 13:22:32 +00:00
Sonatype 850d5a247e Update Repository Manager Cookbook to release-0.5.20180420-205540.75aa3de. 2018-05-29 22:18:48 +00:00
Justin Young a614458159 CI Pipeline Library (#103) 2018-05-29 15:16:46 -07:00
Sonatype 3a68297242 Update Repository Manager to 3.12.0-01. 2018-05-22 21:38:51 +00:00
Sonatype 5f926027a5 Update Repository Manager to 3.11.0-01. 2018-05-01 19:43:30 +00:00
Justin Young af1f6b460c Update JRE Url from Jenkins Parameter (#101)
* Update JRE Url from Jenkins parameter.

* Adjust Jenkins stage name to be more descriptive.

* Update JRE Url from Jenkins test (#102)

* Update Oracle JRE to 8u172-b11.
2018-04-20 14:57:11 -07:00
Sonatype 7083c277f3 Update Repository Manager to 3.10.0-04. Update Repository Manager Cookbook to release-0.5.20180307-101842.bde3aae. 2018-04-05 15:11:19 +00:00
Justin Young a6d18f36fc Documentation on pulling Red Hat certified image from the Red Hat Container Catalog. 2018-03-22 16:12:16 -07:00
Justin Young 4c730ede7e Documentation fix regarding the persistence of a docker volume. 2018-03-22 13:59:47 -07:00
Justin Young 005381cc14 When updating version from master, use short version for tag. 2018-03-08 10:48:40 -08:00
Joe Tom eee4bcdbf6 Fixes
* I made the link direct because it was 403ing on https://hub.docker.com/r/sonatype/nexus3/#running with the partial link.
* While here noticed a typo fix, fixed that too.
2018-03-07 10:34:12 -05:00
Sonatype 26c8c44a72 Update Repository Manager to 3.9.0-01. 2018-03-01 00:21:56 +00:00
Justin Young 042408ae64 When automating version updates, ensure tags to GH and DH use latest version. 2018-02-14 13:43:05 -08:00
7 changed files with 49 additions and 76 deletions
+1
View File
@@ -28,6 +28,7 @@ Sonatype internal people:
* [@jeviolle](https://github.com/jeviolle/) (Rick Briganti/The Money)
* [@jswank](https://github.com/jswank/) (Jason Swank)
* [@DarthHater](https://github.com/darthhater/) (Jeffry Hesse)
* [@dawidsawa](https://github.com/dawidsawa/) (Dawid Sawa)
External contributors:
+11 -19
View File
@@ -12,26 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM centos:centos7
MAINTAINER Sonatype <cloud-ops@sonatype.com>
FROM registry.access.redhat.com/ubi8/ubi
LABEL vendor=Sonatype \
maintainer="Sonatype <cloud-ops@sonatype.com>" \
com.sonatype.license="Apache License, Version 2.0" \
com.sonatype.name="Nexus Repository Manager base image"
ARG NEXUS_VERSION=3.8.0-02
ARG NEXUS_VERSION=3.19.0-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=949e2e5e99a685ebce6a63ba1ca0d56bc794068922a5279bca59d15bd3ae677c
ENV JAVA_HOME=/opt/java \
JAVA_VERSION_MAJOR=8 \
JAVA_VERSION_MINOR=162 \
JAVA_VERSION_BUILD=12 \
JAVA_DOWNLOAD_HASH=0da788060d494f5095bf8624735fa2f1
ENV JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_DOWNLOAD_HASH}/server-jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
JAVA_DOWNLOAD_SHA256_HASH=6942684acb6001748a01fc090a18f52ebd8cbfcf7be27ec6131981906bfa8b53
ARG NEXUS_DOWNLOAD_SHA256_HASH=fe041d74b5abc3a3536e8ae200029575b0a955e57493bf23f7c59deb8adb8a25
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -39,25 +29,27 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
NEXUS_DATA=/nexus-data \
NEXUS_CONTEXT='' \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='docker'
DOCKER_TYPE='rh-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20180205-125532.9212679"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexus-repository-manager/releases/download/${NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION}/chef-nexus-repository-manager.tar.gz"
ADD solo.json.erb /var/chef/solo.json.erb
# Install using chef-solo
RUN curl -L https://www.getchef.com/chef/install.sh | bash \
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
RUN yum install -y --disableplugin=subscription-manager hostname procps \
&& curl -L https://www.getchef.com/chef/install.sh | bash -s -- -v 14.12.9 \
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
&& chef-solo \
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
--json-attributes /var/chef/solo.json \
&& rpm -qa *chef* | xargs rpm -e \
&& rpm --rebuilddb \
&& rm -rf /etc/chef \
&& rm -rf /opt/chefdk \
&& rm -rf /var/cache/yum \
&& rm -rf /var/chef
&& rm -rf /var/chef \
&& yum clean all
VOLUME ${NEXUS_DATA}
+5 -14
View File
@@ -18,8 +18,8 @@ MAINTAINER Sonatype <cloud-ops@sonatype.com>
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
version="3.8.0-02" \
release="3.8.0" \
version="3.19.0-01" \
release="3.19.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -37,18 +37,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.8.0-02
ARG NEXUS_VERSION=3.19.0-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=949e2e5e99a685ebce6a63ba1ca0d56bc794068922a5279bca59d15bd3ae677c
ENV JAVA_HOME=/opt/java \
JAVA_VERSION_MAJOR=8 \
JAVA_VERSION_MINOR=162 \
JAVA_VERSION_BUILD=12 \
JAVA_DOWNLOAD_HASH=0da788060d494f5095bf8624735fa2f1
ENV JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_DOWNLOAD_HASH}/server-jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
JAVA_DOWNLOAD_SHA256_HASH=6942684acb6001748a01fc090a18f52ebd8cbfcf7be27ec6131981906bfa8b53
ARG NEXUS_DOWNLOAD_SHA256_HASH=fe041d74b5abc3a3536e8ae200029575b0a955e57493bf23f7c59deb8adb8a25
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -58,7 +49,7 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='rh-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20180205-125532.9212679"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexus-repository-manager/releases/download/${NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION}/chef-nexus-repository-manager.tar.gz"
ADD solo.json.erb /var/chef/solo.json.erb
+5 -14
View File
@@ -18,8 +18,8 @@ MAINTAINER Sonatype <cloud-ops@sonatype.com>
LABEL name="Nexus Repository Manager" \
vendor=Sonatype \
version="3.8.0-02" \
release="3.8.0" \
version="3.19.0-01" \
release="3.19.0" \
url="https://sonatype.com" \
summary="The Nexus Repository Manager server \
with universal support for popular component formats." \
@@ -37,18 +37,9 @@ LABEL name="Nexus Repository Manager" \
io.openshift.expose-services="8081:8081" \
io.openshift.tags="Sonatype,Nexus,Repository Manager"
ARG NEXUS_VERSION=3.8.0-02
ARG NEXUS_VERSION=3.19.0-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
ARG NEXUS_DOWNLOAD_SHA256_HASH=949e2e5e99a685ebce6a63ba1ca0d56bc794068922a5279bca59d15bd3ae677c
ENV JAVA_HOME=/opt/java \
JAVA_VERSION_MAJOR=8 \
JAVA_VERSION_MINOR=162 \
JAVA_VERSION_BUILD=12 \
JAVA_DOWNLOAD_HASH=0da788060d494f5095bf8624735fa2f1
ENV JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_DOWNLOAD_HASH}/server-jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
JAVA_DOWNLOAD_SHA256_HASH=6942684acb6001748a01fc090a18f52ebd8cbfcf7be27ec6131981906bfa8b53
ARG NEXUS_DOWNLOAD_SHA256_HASH=fe041d74b5abc3a3536e8ae200029575b0a955e57493bf23f7c59deb8adb8a25
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -58,7 +49,7 @@ ENV NEXUS_HOME=${SONATYPE_DIR}/nexus \
SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \
DOCKER_TYPE='rh-docker'
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20180205-125532.9212679"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20190212-155606.d1afdfe"
ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexus-repository-manager/releases/download/${NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION}/chef-nexus-repository-manager.tar.gz"
ADD solo.json.erb /var/chef/solo.json.erb
Vendored
+13 -7
View File
@@ -3,7 +3,7 @@
* Includes the third-party code listed at http://links.sonatype.com/products/nexus/attributions.
* "Sonatype" is a trademark of Sonatype, Inc.
*/
@Library('zion-pipeline-library')
@Library('ci-pipeline-library') _
import com.sonatype.jenkins.pipeline.GitHub
import com.sonatype.jenkins.pipeline.OsTools
@@ -12,7 +12,7 @@ properties([
string(defaultValue: '', description: 'New Nexus Repository Manager Version', name: 'nexus_repository_manager_version'),
string(defaultValue: '', description: 'New Nexus Repository Manager Version Sha256', name: 'nexus_repository_manager_version_sha'),
string(defaultValue: '', description: 'New Nexus Repository Manager Cookbook Version', name: 'nexus_repository_manager_cookbook_version')
string(defaultValue: '', description: 'New Nexus Repository Manager Cookbook Version', name: 'nexus_repository_manager_cookbook_version'),
])
])
@@ -59,6 +59,7 @@ node('ubuntu-zion') {
stage('Update Repository Manager Version') {
OsTools.runSafe(this, "git checkout ${branch}")
dockerFileLocations.each { updateRepositoryManagerVersion(it) }
version = getShortVersion(params.nexus_repository_manager_version)
}
}
if (params.nexus_repository_manager_cookbook_version) {
@@ -102,16 +103,16 @@ node('ubuntu-zion') {
if (currentBuild.result == 'FAILURE') {
return
}
if (params.nexus_repository_manager_version
&& params.nexus_repository_manager_version_sha || params.nexus_repository_manager_cookbook_version) {
stage('Commit Repository Manager Version Update') {
if (params.nexus_repository_manager_version && params.nexus_repository_manager_version_sha
|| params.nexus_repository_manager_cookbook_version) {
stage('Commit Automated Code Update') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'integrations-github-api',
usernameVariable: 'GITHUB_API_USERNAME', passwordVariable: 'GITHUB_API_PASSWORD']]) {
def commitMessage = [
params.nexus_repository_manager_version && params.nexus_repository_manager_version_sha ?
"Update Repository Manager to ${params.nexus_repository_manager_version}." : "",
params.nexus_repository_manager_cookbook_version ?
"Update Repository Manager Cookbook to ${params.nexus_repository_manager_cookbook_version}." : "",
"Update Repository Manager Cookbook to ${params.nexus_repository_manager_cookbook_version}." : ""
].findAll({ it }).join(' ')
OsTools.runSafe(this, """
git add .
@@ -183,11 +184,16 @@ def readVersion() {
def content = readFile 'Dockerfile'
for (line in content.split('\n')) {
if (line.startsWith('ARG NEXUS_VERSION=')) {
return line.substring(18).split('-')[0]
return getShortVersion(line.substring(18))
}
}
error 'Could not determine version.'
}
def getShortVersion(version) {
return version.split('-')[0]
}
def getGemInstallDirectory() {
def content = OsTools.runSafe(this, "gem env")
for (line in content.split('\n')) {
+12 -8
View File
@@ -20,7 +20,7 @@
[![Join the chat at https://gitter.im/sonatype/nexus-developers](https://badges.gitter.im/sonatype/nexus-developers.svg)](https://gitter.im/sonatype/nexus-developers?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A Dockerfile for Sonatype Nexus Repository Manager 3, based on CentOS.
A Dockerfile for Sonatype Nexus Repository Manager 3, starting with 3.18 the image is based on the [Red Hat Universal Base Image](https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image) while earlier versions used CentOS.
* [Contribution Guidlines](#contribution-guidelines)
* [Running](#running)
@@ -34,12 +34,12 @@ A Dockerfile for Sonatype Nexus Repository Manager 3, based on CentOS.
## Contribution Guidelines
Go read [our contribution guidelines](/.github/CONTRIBUTING.md) to get a bit more familiar with how
Go read [our contribution guidelines](https://github.com/sonatype/docker-nexus3/blob/master/.github/CONTRIBUTING.md) to get a bit more familiar with how
we would like things to flow.
## Running
To run, binding the exposed port 8081 to the host.
To run, binding the exposed port 8081 to the host, use:
```
$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3
@@ -48,7 +48,7 @@ $ docker run -d -p 8081:8081 --name nexus sonatype/nexus3
To test:
```
$ curl -u admin:admin123 http://localhost:8081/service/metrics/ping
$ curl http://localhost:8081/
```
## Building the Nexus Repository Manager image
@@ -81,15 +81,20 @@ We are using `rspec` as the test framework. `serverspec` provides a docker backe
## Red Hat Certified Image
A Red Hat certified container image can be created using `Dockerfile.rh.el` which is built to be compliant with Red Had certification.
A Red Hat certified container image can be created using `Dockerfile.rh.el` which is built to be compliant with Red Hat certification.
The image includes additional meta data to comform with Kubernetes and OpenShift standards, a directory with the
licenses applicable to the software and a man file for help on how to use the software. It also uses an ENTRYPOINT
script the ensure the running user has access to the appropriate permissions for OpenShift 'restricted' SCC. In addition to the
Red Hat Enterprise Linux image, `Dockerfile.rh.centos` provides the same additions but with a CentOS base.
The Red Hat certified container image is available from the
[Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.connect.redhat.com/sonatype/nexus-repository-manager)
and qualified accounts can pull it from registry.connect.redhat.com.
## Notes
* Default credentials are: `admin` / `admin123`
* Our [system requirements](https://help.sonatype.com/display/NXRM3/System+Requirements) should be taken into account when provisioning the Docker container.
* Default user is `admin` and the uniquely generated password can be found in the `admin.password` file inside the volume. See [Persistent Data](#user-content-persistent-data) for information about the volume.
* It can take some time (2-3 minutes) for the service to launch in a
new container. You can tail the log to determine once Nexus is ready:
@@ -133,8 +138,7 @@ There are two general approaches to handling persistent storage requirements
with Docker. See [Managing Data in Containers](https://docs.docker.com/engine/tutorials/dockervolumes/)
for additional information.
1. *Use a data volume*. Since data volumes are persistent
until no containers use them, a volume can be created specifically for
1. *Use a docker volume*. Since docker volumes are persistent, a volume can be created specifically for
this purpose. This is the recommended approach.
```
+2 -14
View File
@@ -23,20 +23,8 @@ raise RuntimeError, 'environment variable NEXUS_DATA is required' if ENV['NEXUS_
{
:run_list => [ "recipe[nexus_repository_manager::#{ENV['DOCKER_TYPE']}]" ],
:java => {
:jdk_version => ENV['JAVA_VERSION_MAJOR'],
:java_home => ENV['JAVA_HOME'],
:install_flavor => 'oracle',
:oracle => {
:accept_oracle_download_terms => true
},
:jdk => {
:'8' => {
:x86_64 => {
:url => ENV['JAVA_URL'],
:checksum => ENV['JAVA_DOWNLOAD_SHA256_HASH']
}
}
}
:install_flavor => 'openjdk',
:accept_license_agreement => true
},
:nexus_repository_manager => {
:version => ENV['NEXUS_VERSION'],