Skip to content

Commit

Permalink
Merge pull request #1 from stakater-docker/bump-to-3.28.1
Browse files Browse the repository at this point in the history
Bump to 3.28.1
  • Loading branch information
josedev-union authored Nov 11, 2020
2 parents 6f1e898 + 37ae025 commit 948a696
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 518 deletions.
53 changes: 16 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,45 +1,24 @@
# Using the docker-nexus3 Dockerfile, removing VOLUME to run on OpenShift
# Until we have initContainers in Kubernetes 1.4 we have to use a custom script to configure nexus after starting
FROM fabric8/java-centos-openjdk8-jre
# https://github.com/sonatype/docker-nexus3
# https://hub.docker.com/r/sonatype/nexus3
FROM sonatype/nexus3:3.28.1

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

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

RUN yum install -y \
curl tar \
&& yum clean all
USER root

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

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

RUN useradd -r -u 200 -m -c "nexus role account" -d ${NEXUS_DATA} -s /bin/false nexus

ENV EXTRA_JAVA_OPTS ""

EXPOSE 8081

ADD *.json /opt/sonatype/nexus/
ADD postStart.sh /opt/sonatype/nexus/

RUN chown nexus:nexus /opt/sonatype/nexus/
# setup permissions
RUN chown nexus:nexus -R /opt/sonatype/nexus

USER nexus
WORKDIR /opt/sonatype/nexus

CMD bin/nexus run
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env groovy
@Library('github.com/stakater/[email protected]') _

pushDockerImage {
dockerRepositoryURL = "docker.io"
imagePrefix = "3.28.1-keycloak_plugin0.4.1"
}
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# dockerfile-nexus3
dockerfile for nexus3
[Reference]: https://github.com/flytreeleft/nexus3-keycloak-plugin

## Whats in the box?

CentOS:7 -> Openjdk8-jre -> Nexus3

- [CentOS:7](https://github.com/CentOS/sig-cloud-instance-images/blob/16dab97b0ce72b1db7a2f9b02c76e452cb0a63cb/docker/Dockerfile)
- [Openjdk8 JRE](https://github.com/fabric8io-images/java/blob/master/images/centos/openjdk8/jre/Dockerfile)
- [Agent-Bond: 1.0.2 (Jolokia 1.3.6, jmx_exporter 0.9)](https://github.com/fabric8io/agent-bond)
This is a modified Docker image based on the [public sonatype/nexus3:3.28.1](https://hub.docker.com/r/sonatype/nexus3/),
keycloak plugin has been added.
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"

IMAGE_NAME=stakater/nexus3
IMAGE_VERSION=3.28.1-keycloak_plugin0.4.1

docker build -t ${IMAGE_NAME}:${IMAGE_VERSION} \
-f "${DIR}/Dockerfile" "${DIR}"
6 changes: 0 additions & 6 deletions eclipselink.json

This file was deleted.

5 changes: 0 additions & 5 deletions fuse-ea.json

This file was deleted.

5 changes: 0 additions & 5 deletions fuse.json

This file was deleted.

5 changes: 0 additions & 5 deletions jboss-http.json

This file was deleted.

5 changes: 0 additions & 5 deletions jboss.json

This file was deleted.

6 changes: 0 additions & 6 deletions jcenter.json

This file was deleted.

5 changes: 0 additions & 5 deletions jenkins-ci.json

This file was deleted.

Loading

0 comments on commit 948a696

Please sign in to comment.