Skip to content

Commit 948a696

Browse files
Merge pull request #1 from stakater-docker/bump-to-3.28.1
Bump to 3.28.1
2 parents 6f1e898 + 37ae025 commit 948a696

26 files changed

+34
-518
lines changed

Dockerfile

+16-37
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,24 @@
1-
# Using the docker-nexus3 Dockerfile, removing VOLUME to run on OpenShift
2-
# Until we have initContainers in Kubernetes 1.4 we have to use a custom script to configure nexus after starting
3-
FROM fabric8/java-centos-openjdk8-jre
1+
# https://github.com/sonatype/docker-nexus3
2+
# https://hub.docker.com/r/sonatype/nexus3
3+
FROM sonatype/nexus3:3.28.1
44

5-
ENV NEXUS_DATA /nexus-data
5+
ENV NEXUS_PLUGINS ${NEXUS_HOME}/system
66

7-
ENV NEXUS_VERSION 3.0.2-02
7+
# https://github.com/flytreeleft/nexus3-keycloak-plugin
8+
ENV KEYCLOAK_PLUGIN_VERSION 0.4.1-SNAPSHOT
9+
# The release name in the release page: https://github.com/flytreeleft/nexus3-keycloak-plugin/releases
10+
ENV KEYCLOAK_PLUGIN_RELEASE_NAME 0.4.1-prev1-SNAPSHOT
11+
ENV KEYCLOAK_PLUGIN /org/github/flytreeleft/nexus3-keycloak-plugin/${KEYCLOAK_PLUGIN_VERSION}/nexus3-keycloak-plugin-${KEYCLOAK_PLUGIN_VERSION}
812

9-
RUN yum install -y \
10-
curl tar \
11-
&& yum clean all
13+
USER root
1214

13-
# install nexus
14-
RUN mkdir -p /opt/sonatype/nexus \
15-
&& curl --fail --silent --location --retry 3 \
16-
https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz \
17-
| gunzip \
18-
| tar x -C /opt/sonatype/nexus --strip-components=1 nexus-${NEXUS_VERSION} \
19-
&& chown -R root:root /opt/sonatype/nexus
15+
ADD https://github.com/flytreeleft/nexus3-keycloak-plugin/releases/download/${KEYCLOAK_PLUGIN_RELEASE_NAME}/nexus3-keycloak-plugin-${KEYCLOAK_PLUGIN_VERSION}.jar \
16+
${NEXUS_PLUGINS}${KEYCLOAK_PLUGIN}.jar
2017

21-
## configure nexus runtime env
22-
RUN sed \
23-
-e "s|karaf.home=.|karaf.home=/opt/sonatype/nexus|g" \
24-
-e "s|karaf.base=.|karaf.base=/opt/sonatype/nexus|g" \
25-
-e "s|karaf.etc=etc|karaf.etc=/opt/sonatype/nexus/etc|g" \
26-
-e "s|java.util.logging.config.file=etc|java.util.logging.config.file=/opt/sonatype/nexus/etc|g" \
27-
-e "s|karaf.data=data|karaf.data=${NEXUS_DATA}|g" \
28-
-e "s|java.io.tmpdir=data/tmp|java.io.tmpdir=${NEXUS_DATA}/tmp|g" \
29-
-i /opt/sonatype/nexus/bin/nexus.vmoptions
18+
RUN chmod 644 ${NEXUS_PLUGINS}${KEYCLOAK_PLUGIN}.jar
19+
RUN echo "reference\:file\:${KEYCLOAK_PLUGIN}.jar = 200" >> ${NEXUS_HOME}/etc/karaf/startup.properties
3020

31-
RUN useradd -r -u 200 -m -c "nexus role account" -d ${NEXUS_DATA} -s /bin/false nexus
32-
33-
ENV EXTRA_JAVA_OPTS ""
34-
35-
EXPOSE 8081
36-
37-
ADD *.json /opt/sonatype/nexus/
38-
ADD postStart.sh /opt/sonatype/nexus/
39-
40-
RUN chown nexus:nexus /opt/sonatype/nexus/
21+
# setup permissions
22+
RUN chown nexus:nexus -R /opt/sonatype/nexus
4123

4224
USER nexus
43-
WORKDIR /opt/sonatype/nexus
44-
45-
CMD bin/nexus run

Jenkinsfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env groovy
2+
@Library('github.com/stakater/stakater-pipeline-library@v2.16.35') _
3+
4+
pushDockerImage {
5+
dockerRepositoryURL = "docker.io"
6+
imagePrefix = "3.28.1-keycloak_plugin0.4.1"
7+
}

LICENSE

-201
This file was deleted.

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# dockerfile-nexus3
2-
dockerfile for nexus3
1+
[Reference]: https://github.com/flytreeleft/nexus3-keycloak-plugin
32

4-
## Whats in the box?
5-
6-
CentOS:7 -> Openjdk8-jre -> Nexus3
7-
8-
- [CentOS:7](https://github.com/CentOS/sig-cloud-instance-images/blob/16dab97b0ce72b1db7a2f9b02c76e452cb0a63cb/docker/Dockerfile)
9-
- [Openjdk8 JRE](https://github.com/fabric8io-images/java/blob/master/images/centos/openjdk8/jre/Dockerfile)
10-
- [Agent-Bond: 1.0.2 (Jolokia 1.3.6, jmx_exporter 0.9)](https://github.com/fabric8io/agent-bond)
3+
This is a modified Docker image based on the [public sonatype/nexus3:3.28.1](https://hub.docker.com/r/sonatype/nexus3/),
4+
keycloak plugin has been added.

build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
3+
4+
IMAGE_NAME=stakater/nexus3
5+
IMAGE_VERSION=3.28.1-keycloak_plugin0.4.1
6+
7+
docker build -t ${IMAGE_NAME}:${IMAGE_VERSION} \
8+
-f "${DIR}/Dockerfile" "${DIR}"

eclipselink.json

-6
This file was deleted.

fuse-ea.json

-5
This file was deleted.

fuse.json

-5
This file was deleted.

jboss-http.json

-5
This file was deleted.

jboss.json

-5
This file was deleted.

jcenter.json

-6
This file was deleted.

jenkins-ci.json

-5
This file was deleted.

0 commit comments

Comments
 (0)