3.44.0 #2
48
.drone.yml
48
.drone.yml
@@ -5,15 +5,41 @@ platform:
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: testdocker
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker images
|
||||
- name: dryrun-nexus3-build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo:
|
||||
from_secret: docker_repo
|
||||
cache_from:
|
||||
from_secret: docker_repo
|
||||
dockerfile: Dockerfile.rh.ubi
|
||||
mirror:
|
||||
from_secret: docker_regst
|
||||
insecure: true
|
||||
auto_tag: true
|
||||
dry_run: true
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
- name: docker-build-push
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo:
|
||||
from_secret: docker_repo
|
||||
username:
|
||||
from_secret: docker_user
|
||||
password:
|
||||
from_secret: docker_pass
|
||||
registry:
|
||||
from_secret: docker_regst
|
||||
cache_from:
|
||||
from_secret: docker_repo
|
||||
dockerfile: Dockerfile
|
||||
auto_tag: true
|
||||
insecure: true
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
62
Dockerfile
62
Dockerfile
@@ -12,13 +12,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM registry.access.redhat.com/ubi8/ubi
|
||||
FROM registry.access.redhat.com/ubi8/ubi-minimal
|
||||
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
vendor=Sonatype \
|
||||
version="3.41.0-01" \
|
||||
release="3.41.0" \
|
||||
version="3.44.0-01" \
|
||||
release="3.44.0" \
|
||||
url="https://sonatype.com" \
|
||||
summary="The Nexus Repository Manager server \
|
||||
with universal support for popular component formats." \
|
||||
@@ -36,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
|
||||
io.openshift.expose-services="8081:8081" \
|
||||
io.openshift.tags="Sonatype,Nexus,Repository Manager"
|
||||
|
||||
ARG NEXUS_VERSION=3.41.0-01
|
||||
ARG NEXUS_VERSION=3.44.0-01
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=ce265e627a665f9e833bf9c6e15a58c739882eb753863062f9e42e83e6f0d844
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=1b508c4494845c27a8afd56a5b2065039a1867a5a6ce022f12251e0a9b358b76
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
@@ -48,28 +48,38 @@ 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.20220111-153152.2b86c3a"
|
||||
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"
|
||||
# Install Java & tar
|
||||
RUN microdnf update -y \
|
||||
&& microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y \
|
||||
java-1.8.0-openjdk-headless tar procps shadow-utils gzip \
|
||||
&& microdnf clean all \
|
||||
&& groupadd --gid 200 -r nexus \
|
||||
&& useradd --uid 200 -r nexus -g nexus -s /bin/false -d /opt/sonatype/nexus -c 'Nexus Repository Manager user'
|
||||
|
||||
ADD solo.json.erb /var/chef/solo.json.erb
|
||||
WORKDIR ${SONATYPE_DIR}
|
||||
|
||||
# Download nexus & setup directories
|
||||
RUN curl -L ${NEXUS_DOWNLOAD_URL} --output nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& echo "${NEXUS_DOWNLOAD_SHA256_HASH} nexus-${NEXUS_VERSION}-unix.tar.gz" > nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& sha256sum -c nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& tar -xvf nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& rm -f nexus-${NEXUS_VERSION}-unix.tar.gz nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& mv nexus-${NEXUS_VERSION} $NEXUS_HOME \
|
||||
&& chown -R nexus:nexus ${SONATYPE_WORK} \
|
||||
&& mv ${SONATYPE_WORK}/nexus3 ${NEXUS_DATA} \
|
||||
&& ln -s ${NEXUS_DATA} ${SONATYPE_WORK}/nexus3
|
||||
|
||||
# Removing java memory settings from nexus.vmoptions since now we use INSTALL4J_ADD_VM_PARAMS
|
||||
RUN sed -i '/^-Xms/d;/^-Xmx/d;/^-XX:MaxDirectMemorySize/d' $NEXUS_HOME/bin/nexus.vmoptions
|
||||
|
||||
RUN echo "#!/bin/bash" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "cd /opt/sonatype/nexus" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "exec ./bin/nexus run" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& chmod a+x ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& sed -e '/^nexus-context/ s:$:${NEXUS_CONTEXT}:' -i ${NEXUS_HOME}/etc/nexus-default.properties
|
||||
|
||||
RUN microdnf remove -y tar gzip shadow-utils
|
||||
|
||||
# Install using chef-solo
|
||||
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN yum install -y --disableplugin=subscription-manager hostname procps \
|
||||
&& curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /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 \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rm -rf /etc/chef \
|
||||
&& rm -rf /opt/chefdk \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& rm -rf /var/chef \
|
||||
&& yum clean all
|
||||
|
||||
VOLUME ${NEXUS_DATA}
|
||||
|
||||
EXPOSE 8081
|
||||
@@ -77,4 +87,4 @@ USER nexus
|
||||
|
||||
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
|
||||
|
||||
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
|
||||
CMD ["/opt/sonatype/nexus/bin/nexus", "run"]
|
||||
|
||||
@@ -17,8 +17,8 @@ FROM centos:centos7
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
vendor=Sonatype \
|
||||
version="3.41.0-01" \
|
||||
release="3.41.0" \
|
||||
version="3.44.0-01" \
|
||||
release="3.44.0" \
|
||||
url="https://sonatype.com" \
|
||||
summary="The Nexus Repository Manager server \
|
||||
with universal support for popular component formats." \
|
||||
@@ -36,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
|
||||
io.openshift.expose-services="8081:8081" \
|
||||
io.openshift.tags="Sonatype,Nexus,Repository Manager"
|
||||
|
||||
ARG NEXUS_VERSION=3.41.0-01
|
||||
ARG NEXUS_VERSION=3.44.0-01
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=ce265e627a665f9e833bf9c6e15a58c739882eb753863062f9e42e83e6f0d844
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=1b508c4494845c27a8afd56a5b2065039a1867a5a6ce022f12251e0a9b358b76
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
@@ -48,26 +48,45 @@ 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.20220111-153152.2b86c3a"
|
||||
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
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--node_name nexus_repository_red_hat_docker_build \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rpm --rebuilddb \
|
||||
&& rm -rf /etc/chef \
|
||||
&& rm -rf /opt/chefdk \
|
||||
# Install java & setup user
|
||||
RUN yum install -y java-1.8.0-openjdk-headless \
|
||||
&& yum clean all \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& rm -rf /var/chef
|
||||
&& groupadd --gid 200 -r nexus \
|
||||
&& useradd --uid 200 -r nexus -g nexus -s /bin/false -d /opt/sonatype/nexus -c 'Nexus Repository Manager user'
|
||||
|
||||
# Red Hat Certified Container commands
|
||||
COPY rh-docker /
|
||||
RUN usermod -a -G root nexus \
|
||||
&& chmod -R 0755 /licenses \
|
||||
&& chmod 0755 /help.1 \
|
||||
&& chmod 0755 /uid_entrypoint.sh \
|
||||
&& chmod 0755 /uid_template.sh \
|
||||
&& bash /uid_template.sh \
|
||||
&& chmod 0664 /etc/passwd
|
||||
|
||||
WORKDIR ${SONATYPE_DIR}
|
||||
|
||||
# Download nexus & setup directories
|
||||
RUN curl -L ${NEXUS_DOWNLOAD_URL} --output nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& echo "${NEXUS_DOWNLOAD_SHA256_HASH} nexus-${NEXUS_VERSION}-unix.tar.gz" > nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& sha256sum -c nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& tar -xvf nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& rm -f nexus-${NEXUS_VERSION}-unix.tar.gz nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& mv nexus-${NEXUS_VERSION} $NEXUS_HOME \
|
||||
&& chown -R nexus:nexus ${SONATYPE_WORK} \
|
||||
&& mv ${SONATYPE_WORK}/nexus3 ${NEXUS_DATA} \
|
||||
&& ln -s ${NEXUS_DATA} ${SONATYPE_WORK}/nexus3
|
||||
|
||||
# Removing java memory settings from nexus.vmoptions since now we use INSTALL4J_ADD_VM_PARAMS
|
||||
RUN sed -i '/^-Xms/d;/^-Xmx/d;/^-XX:MaxDirectMemorySize/d' $NEXUS_HOME/bin/nexus.vmoptions
|
||||
|
||||
# Legacy start script
|
||||
RUN echo "#!/bin/bash" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "cd /opt/sonatype/nexus" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "exec ./bin/nexus run" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& chmod a+x ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& sed -e '/^nexus-context/ s:$:${NEXUS_CONTEXT}:' -i ${NEXUS_HOME}/etc/nexus-default.properties
|
||||
|
||||
VOLUME ${NEXUS_DATA}
|
||||
|
||||
@@ -77,4 +96,4 @@ USER nexus
|
||||
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
|
||||
|
||||
ENTRYPOINT ["/uid_entrypoint.sh"]
|
||||
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
|
||||
CMD ["/opt/sonatype/nexus/bin/nexus", "run"]
|
||||
|
||||
@@ -17,8 +17,8 @@ FROM registry.access.redhat.com/rhel7/rhel
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
vendor=Sonatype \
|
||||
version="3.41.0-01" \
|
||||
release="3.41.0" \
|
||||
version="3.44.0-01" \
|
||||
release="3.44.0" \
|
||||
url="https://sonatype.com" \
|
||||
summary="The Nexus Repository Manager server \
|
||||
with universal support for popular component formats." \
|
||||
@@ -36,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
|
||||
io.openshift.expose-services="8081:8081" \
|
||||
io.openshift.tags="Sonatype,Nexus,Repository Manager"
|
||||
|
||||
ARG NEXUS_VERSION=3.41.0-01
|
||||
ARG NEXUS_VERSION=3.44.0-01
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=ce265e627a665f9e833bf9c6e15a58c739882eb753863062f9e42e83e6f0d844
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=1b508c4494845c27a8afd56a5b2065039a1867a5a6ce022f12251e0a9b358b76
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
@@ -48,26 +48,45 @@ 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.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
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--node_name nexus_repository_red_hat_docker_build \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rpm --rebuilddb \
|
||||
&& rm -rf /etc/chef \
|
||||
&& rm -rf /opt/chefdk \
|
||||
# Install java & setup user
|
||||
RUN yum install -y java-1.8.0-openjdk-headless \
|
||||
&& yum clean all \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& rm -rf /var/chef
|
||||
&& groupadd --gid 200 -r nexus \
|
||||
&& useradd --uid 200 -r nexus -g nexus -s /bin/false -d /opt/sonatype/nexus -c 'Nexus Repository Manager user'
|
||||
|
||||
# Red Hat Certified Container commands
|
||||
COPY rh-docker /
|
||||
RUN usermod -a -G root nexus \
|
||||
&& chmod -R 0755 /licenses \
|
||||
&& chmod 0755 /help.1 \
|
||||
&& chmod 0755 /uid_entrypoint.sh \
|
||||
&& chmod 0755 /uid_template.sh \
|
||||
&& bash /uid_template.sh \
|
||||
&& chmod 0664 /etc/passwd
|
||||
|
||||
WORKDIR ${SONATYPE_DIR}
|
||||
|
||||
# Download nexus & setup directories
|
||||
RUN curl -L ${NEXUS_DOWNLOAD_URL} --output nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& echo "${NEXUS_DOWNLOAD_SHA256_HASH} nexus-${NEXUS_VERSION}-unix.tar.gz" > nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& sha256sum -c nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& tar -xvf nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& rm -f nexus-${NEXUS_VERSION}-unix.tar.gz nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& mv nexus-${NEXUS_VERSION} $NEXUS_HOME \
|
||||
&& chown -R nexus:nexus ${SONATYPE_WORK} \
|
||||
&& mv ${SONATYPE_WORK}/nexus3 ${NEXUS_DATA} \
|
||||
&& ln -s ${NEXUS_DATA} ${SONATYPE_WORK}/nexus3
|
||||
|
||||
# Removing java memory settings from nexus.vmoptions since now we use INSTALL4J_ADD_VM_PARAMS
|
||||
RUN sed -i '/^-Xms/d;/^-Xmx/d;/^-XX:MaxDirectMemorySize/d' $NEXUS_HOME/bin/nexus.vmoptions
|
||||
|
||||
# Legacy start script
|
||||
RUN echo "#!/bin/bash" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "cd /opt/sonatype/nexus" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "exec ./bin/nexus run" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& chmod a+x ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& sed -e '/^nexus-context/ s:$:${NEXUS_CONTEXT}:' -i ${NEXUS_HOME}/etc/nexus-default.properties
|
||||
|
||||
VOLUME ${NEXUS_DATA}
|
||||
|
||||
@@ -77,4 +96,4 @@ USER nexus
|
||||
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
|
||||
|
||||
ENTRYPOINT ["/uid_entrypoint.sh"]
|
||||
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
|
||||
CMD ["/opt/sonatype/nexus/bin/nexus", "run"]
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM registry.access.redhat.com/ubi8/ubi
|
||||
FROM registry.access.redhat.com/ubi8/ubi-minimal
|
||||
|
||||
LABEL name="Nexus Repository Manager" \
|
||||
vendor=Sonatype \
|
||||
maintainer="Sonatype <support@sonatype.com>" \
|
||||
version="3.41.0-01" \
|
||||
release="3.41.0" \
|
||||
version="3.44.0-01" \
|
||||
release="3.44.0" \
|
||||
url="https://sonatype.com" \
|
||||
summary="The Nexus Repository Manager server \
|
||||
with universal support for popular component formats." \
|
||||
@@ -36,9 +36,9 @@ LABEL name="Nexus Repository Manager" \
|
||||
io.openshift.expose-services="8081:8081" \
|
||||
io.openshift.tags="Sonatype,Nexus,Repository Manager"
|
||||
|
||||
ARG NEXUS_VERSION=3.41.0-01
|
||||
ARG NEXUS_VERSION=3.44.0-01
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=ce265e627a665f9e833bf9c6e15a58c739882eb753863062f9e42e83e6f0d844
|
||||
ARG NEXUS_DOWNLOAD_SHA256_HASH=1b508c4494845c27a8afd56a5b2065039a1867a5a6ce022f12251e0a9b358b76
|
||||
|
||||
# configure nexus runtime
|
||||
ENV SONATYPE_DIR=/opt/sonatype
|
||||
@@ -48,27 +48,49 @@ 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.20220111-153152.2b86c3a"
|
||||
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"
|
||||
# Install java & setup user
|
||||
RUN microdnf update -y \
|
||||
&& microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y \
|
||||
java-1.8.0-openjdk-headless tar procps shadow-utils gzip \
|
||||
&& microdnf clean all \
|
||||
&& groupadd --gid 200 -r nexus \
|
||||
&& useradd --uid 200 -r nexus -g nexus -s /bin/false -d /opt/sonatype/nexus -c 'Nexus Repository Manager user'
|
||||
|
||||
ADD solo.json.erb /var/chef/solo.json.erb
|
||||
# Red Hat Certified Container commands
|
||||
COPY rh-docker /
|
||||
RUN usermod -a -G root nexus \
|
||||
&& chmod -R 0755 /licenses \
|
||||
&& chmod 0755 /help.1 \
|
||||
&& chmod 0755 /uid_entrypoint.sh \
|
||||
&& chmod 0755 /uid_template.sh \
|
||||
&& bash /uid_template.sh \
|
||||
&& chmod 0664 /etc/passwd
|
||||
|
||||
# Install using chef-solo
|
||||
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--node_name nexus_repository_red_hat_docker_build \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rm -rf /etc/chef \
|
||||
&& rm -rf /opt/chefdk \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& rm -rf /var/chef \
|
||||
&& yum clean all
|
||||
WORKDIR ${SONATYPE_DIR}
|
||||
|
||||
# Download nexus & setup directories
|
||||
RUN curl -L ${NEXUS_DOWNLOAD_URL} --output nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& echo "${NEXUS_DOWNLOAD_SHA256_HASH} nexus-${NEXUS_VERSION}-unix.tar.gz" > nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& sha256sum -c nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& tar -xvf nexus-${NEXUS_VERSION}-unix.tar.gz \
|
||||
&& rm -f nexus-${NEXUS_VERSION}-unix.tar.gz nexus-${NEXUS_VERSION}-unix.tar.gz.sha256 \
|
||||
&& mv nexus-${NEXUS_VERSION} $NEXUS_HOME \
|
||||
&& chown -R nexus:nexus ${SONATYPE_WORK} \
|
||||
&& mv ${SONATYPE_WORK}/nexus3 ${NEXUS_DATA} \
|
||||
&& ln -s ${NEXUS_DATA} ${SONATYPE_WORK}/nexus3
|
||||
|
||||
# Removing java memory settings from nexus.vmoptions since now we use INSTALL4J_ADD_VM_PARAMS
|
||||
RUN sed -i '/^-Xms/d;/^-Xmx/d;/^-XX:MaxDirectMemorySize/d' $NEXUS_HOME/bin/nexus.vmoptions
|
||||
|
||||
# Legacy start script
|
||||
RUN echo "#!/bin/bash" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "cd /opt/sonatype/nexus" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& echo "exec ./bin/nexus run" >> ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& chmod a+x ${SONATYPE_DIR}/start-nexus-repository-manager.sh \
|
||||
&& sed -e '/^nexus-context/ s:$:${NEXUS_CONTEXT}:' -i ${NEXUS_HOME}/etc/nexus-default.properties
|
||||
|
||||
# Cleanup
|
||||
RUN microdnf remove -y tar gzip shadow-utils
|
||||
|
||||
VOLUME ${NEXUS_DATA}
|
||||
|
||||
@@ -78,4 +100,4 @@ USER nexus
|
||||
ENV INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
|
||||
|
||||
ENTRYPOINT ["/uid_entrypoint.sh"]
|
||||
CMD ["sh", "-c", "${SONATYPE_DIR}/start-nexus-repository-manager.sh"]
|
||||
CMD ["/opt/sonatype/nexus/bin/nexus", "run"]
|
||||
|
||||
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -24,7 +24,7 @@ node('ubuntu-zion') {
|
||||
|
||||
def checkoutDetails = checkout scm
|
||||
|
||||
branch = checkoutDetails.GIT_BRANCH == 'origin/master' ? 'master' : checkoutDetails.GIT_BRANCH
|
||||
branch = checkoutDetails.GIT_BRANCH == 'origin/main' ? 'main' : checkoutDetails.GIT_BRANCH
|
||||
commitId = checkoutDetails.GIT_COMMIT
|
||||
commitDate = OsTools.runSafe(this, "git show -s --format=%cd --date=format:%Y%m%d-%H%M%S ${commitId}")
|
||||
|
||||
@@ -77,7 +77,7 @@ node('ubuntu-zion') {
|
||||
iqApplication: 'docker-nexus3',
|
||||
iqScanPatterns: [[scanPattern: "container:${imageName}"]],
|
||||
failBuildOnNetworkError: true,
|
||||
)}, (branch == 'master') ? 'build' : 'develop')
|
||||
)}, (branch == 'main') ? 'build' : 'develop')
|
||||
}
|
||||
|
||||
if (currentBuild.result == 'FAILURE') {
|
||||
@@ -93,7 +93,7 @@ node('ubuntu-zion') {
|
||||
} finally {
|
||||
OsTools.runSafe(this, 'docker logout')
|
||||
OsTools.runSafe(this, 'docker system prune -a -f')
|
||||
OsTools.runSafe(this, 'git clean -f && git reset --hard origin/master')
|
||||
OsTools.runSafe(this, 'git clean -f && git reset --hard origin/main')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ properties([
|
||||
])
|
||||
])
|
||||
|
||||
node('ubuntu-zion') {
|
||||
node('ubuntu-zion-legacy') {
|
||||
def commitId, commitDate, version, imageId, branch, dockerFileLocations
|
||||
def organization = 'sonatype',
|
||||
gitHubRepository = 'docker-nexus3',
|
||||
@@ -41,7 +41,7 @@ node('ubuntu-zion') {
|
||||
"${pwd()}/Dockerfile.rh.ubi"
|
||||
]
|
||||
|
||||
branch = checkoutDetails.GIT_BRANCH == 'origin/master' ? 'master' : checkoutDetails.GIT_BRANCH
|
||||
branch = checkoutDetails.GIT_BRANCH == 'origin/main' ? 'main' : checkoutDetails.GIT_BRANCH
|
||||
commitId = checkoutDetails.GIT_COMMIT
|
||||
commitDate = OsTools.runSafe(this, "git show -s --format=%cd --date=format:%Y%m%d-%H%M%S ${commitId}")
|
||||
|
||||
@@ -144,7 +144,7 @@ node('ubuntu-zion') {
|
||||
archiveArtifacts artifacts: "${archiveName}.tar.gz", onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
if (branch == 'master' && !params.skip_push && !params.update_latest_only) {
|
||||
if (branch == 'main' && !params.skip_push && !params.update_latest_only) {
|
||||
input 'Push image and tags?'
|
||||
stage('Push image') {
|
||||
def dockerhubApiToken
|
||||
@@ -203,7 +203,7 @@ node('ubuntu-zion') {
|
||||
} finally {
|
||||
OsTools.runSafe(this, "docker logout")
|
||||
OsTools.runSafe(this, "docker system prune -a -f")
|
||||
OsTools.runSafe(this, 'git clean -f && git reset --hard origin/master')
|
||||
OsTools.runSafe(this, 'git clean -f && git reset --hard origin/main')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,18 +24,19 @@ node('ubuntu-zion') {
|
||||
sh 'docker system prune -a -f'
|
||||
sh '''
|
||||
wget -q -O preflight \
|
||||
https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.3.1/preflight-linux-amd64
|
||||
https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.4.1/preflight-linux-amd64
|
||||
chmod 755 preflight
|
||||
'''
|
||||
}
|
||||
stage('Build') {
|
||||
withCredentials([
|
||||
usernamePassword(
|
||||
credentialsId: 'red-hat-quay-nexus-repository-manager',
|
||||
usernameVariable: 'REGISTRY_LOGIN',
|
||||
passwordVariable: 'REGISTRY_PASSWORD'),
|
||||
string(
|
||||
credentialsId: 'red-hat-scan-registry-password-nexus-repository-manager',
|
||||
variable: 'REGISTRY_PASSWORD'),
|
||||
string(
|
||||
credentialsId: 'red-hat-api-token',
|
||||
variable: 'API_TOKEN'),
|
||||
credentialsId: 'red-hat-api-token',
|
||||
variable: 'API_TOKEN')
|
||||
]) {
|
||||
sh 'PATH="$PATH:." VERSION=$version ./build_red_hat_image.sh'
|
||||
}
|
||||
@@ -43,6 +44,6 @@ node('ubuntu-zion') {
|
||||
} finally {
|
||||
sh 'docker logout'
|
||||
sh 'docker system prune -a -f'
|
||||
sh 'git clean -f && git reset --hard origin/master'
|
||||
sh 'git clean -f && git reset --hard origin/main'
|
||||
}
|
||||
}
|
||||
|
||||
10
README.md
10
README.md
@@ -34,7 +34,7 @@ A Dockerfile for Sonatype Nexus Repository Manager 3, starting with 3.18 the ima
|
||||
|
||||
## Contribution Guidelines
|
||||
|
||||
Go read [our contribution guidelines](https://github.com/sonatype/docker-nexus3/blob/master/.github/CONTRIBUTING.md) to get a bit more familiar with how
|
||||
Go read [our contribution guidelines](https://github.com/sonatype/docker-nexus3/blob/main/.github/CONTRIBUTING.md) to get a bit more familiar with how
|
||||
we would like things to flow.
|
||||
|
||||
## Running
|
||||
@@ -60,7 +60,7 @@ $ curl http://localhost:8081/
|
||||
|
||||
## Building the Nexus Repository Manager image
|
||||
|
||||
To build a docker image from the [Dockerfile](https://github.com/sonatype/docker-nexus3/blob/master/Dockerfile) you can use this command:
|
||||
To build a docker image from the [Dockerfile](https://github.com/sonatype/docker-nexus3/blob/main/Dockerfile) you can use this command:
|
||||
|
||||
```
|
||||
$ docker build --rm=true --tag=sonatype/nexus3 .
|
||||
@@ -88,7 +88,7 @@ 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.ubi](https://github.com/sonatype/docker-nexus3/blob/master/Dockerfile.rh.ubi) which is built to be compliant with Red Hat certification.
|
||||
A Red Hat certified container image can be created using [Dockerfile.rh.ubi](https://github.com/sonatype/docker-nexus3/blob/main/Dockerfile.rh.ubi) 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.
|
||||
@@ -100,8 +100,8 @@ and qualified accounts can pull it from registry.connect.redhat.com.
|
||||
## Other Red Hat Images
|
||||
|
||||
In addition to the Universal Base Image, we can build images based on:
|
||||
* Red Hat Enterprise Linux: [Dockerfile.rh.el](https://github.com/sonatype/docker-nexus3/blob/master/Dockerfile.rh.el)
|
||||
* CentOS: [Dockerfile.rh.centos](https://github.com/sonatype/docker-nexus3/blob/master/Dockerfile.rh.centos)
|
||||
* Red Hat Enterprise Linux: [Dockerfile.rh.el](https://github.com/sonatype/docker-nexus3/blob/main/Dockerfile.rh.el)
|
||||
* CentOS: [Dockerfile.rh.centos](https://github.com/sonatype/docker-nexus3/blob/main/Dockerfile.rh.centos)
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -21,34 +21,36 @@
|
||||
# * https://podman.io/
|
||||
# * environment variables:
|
||||
# * VERSION of the docker image to build for the red hat registry
|
||||
# * REGISTRY_PASSWORD from red hat config page for image
|
||||
# * REGISTRY_LOGIN from Red Hat config page for image
|
||||
# * REGISTRY_PASSWORD from Red Hat config page for image
|
||||
# * API_TOKEN from red hat token/account page for API access
|
||||
|
||||
set -x # log commands as they execute
|
||||
set -e # stop execution on the first failed command
|
||||
|
||||
IMAGE=nexus-repository-manager
|
||||
DOCKERFILE=Dockerfile.rh.ubi
|
||||
|
||||
# from config/scanning page at red hat
|
||||
PROJECT_ID=p725060002a684d7b4fb1475f224f6c26bc3b23998
|
||||
# from url of project at red hat
|
||||
CERT_PROJECT_ID=5e61d90a38776799eb517bd2
|
||||
|
||||
REPOSITORY="quay.io"
|
||||
IMAGE_TAG="${REPOSITORY}/redhat-isv-containers/${CERT_PROJECT_ID}:${VERSION}"
|
||||
IMAGE_LATEST="${REPOSITORY}/redhat-isv-containers/${CERT_PROJECT_ID}:latest"
|
||||
|
||||
AUTHFILE="${HOME}/.docker/config.json"
|
||||
|
||||
docker build \
|
||||
-f "${DOCKERFILE}" \
|
||||
-t "scan.connect.redhat.com/${PROJECT_ID}/${IMAGE}:${VERSION}" \
|
||||
.
|
||||
docker login scan.connect.redhat.com -u unused \
|
||||
docker build -f "${DOCKERFILE}" -t "${IMAGE_TAG}" .
|
||||
docker tag "${IMAGE_TAG}" "${IMAGE_LATEST}"
|
||||
|
||||
docker login "${REPOSITORY}" \
|
||||
-u "${REGISTRY_LOGIN}" \
|
||||
--password "${REGISTRY_PASSWORD}"
|
||||
|
||||
docker push \
|
||||
"scan.connect.redhat.com/${PROJECT_ID}/${IMAGE}:${VERSION}"
|
||||
docker push "${IMAGE_TAG}"
|
||||
docker push "${IMAGE_LATEST}"
|
||||
|
||||
preflight check container \
|
||||
"scan.connect.redhat.com/${PROJECT_ID}/${IMAGE}:${VERSION}" \
|
||||
"${IMAGE_TAG}" \
|
||||
--docker-config="${AUTHFILE}" \
|
||||
--submit \
|
||||
--certification-project-id="${CERT_PROJECT_ID}" \
|
||||
|
||||
74
rh-docker/help.1
Normal file
74
rh-docker/help.1
Normal file
@@ -0,0 +1,74 @@
|
||||
.PP
|
||||
%
|
||||
.BR NEXUS (1)
|
||||
Container Image Pages
|
||||
% Sonatype
|
||||
% December 15, 2017
|
||||
.TH NAME
|
||||
.PP
|
||||
nexus \- Nexus Repository Manager container image
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The nexus image provides a containerized packaging of the Nexus Repository Manager.
|
||||
Nexus Repository Manager is a repository manager with universal support for popular component formats including Maven, Docker, NuGet, npm, PyPi, Bower and more.
|
||||
.PP
|
||||
The nexus image is designed to be run by the atomic command with one of these options:
|
||||
.PP
|
||||
\fB\fCrun\fR
|
||||
.PP
|
||||
Starts the installed container with selected privileges to the host.
|
||||
.PP
|
||||
\fB\fCstop\fR
|
||||
.PP
|
||||
Stops the installed container
|
||||
.PP
|
||||
The container itself consists of:
|
||||
\- Linux base image
|
||||
\- Java OpenJDK
|
||||
\- Nexus Repository Manager
|
||||
\- Atomic help file
|
||||
.PP
|
||||
Files added to the container during docker build include: /help.1.
|
||||
.SH USAGE
|
||||
.PP
|
||||
To use the nexus container, you can run the atomic command with run, stop, or uninstall options:
|
||||
.PP
|
||||
To run the nexus container:
|
||||
.IP
|
||||
atomic run nexus
|
||||
.PP
|
||||
To stop the nexus container (after it is installed), run:
|
||||
.IP
|
||||
atomic stop nexus
|
||||
.SH LABELS
|
||||
.PP
|
||||
The nexus container includes the following LABEL settings:
|
||||
.PP
|
||||
That atomic command runs the docker command set in this label:
|
||||
.PP
|
||||
\fB\fCRUN=\fR
|
||||
.IP
|
||||
LABEL RUN='docker run \-d \-p 8081:8081 \-\-name ${NAME} ${IMAGE}'
|
||||
.IP
|
||||
The contents of the RUN label tells an \fB\fCatomic run nexus\fR command to open port 8081 & set the name of the container.
|
||||
.PP
|
||||
\fB\fCSTOP=\fR
|
||||
.IP
|
||||
LABEL STOP='docker stop ${NAME}'
|
||||
.PP
|
||||
\fB\fCName=\fR
|
||||
.PP
|
||||
The registry location and name of the image. For example, Name="Nexus Repository Manager".
|
||||
.PP
|
||||
\fB\fCVersion=\fR
|
||||
.PP
|
||||
The Nexus Repository Manager version from which the container was built. For example, Version="3.6.2\-01".
|
||||
.PP
|
||||
When the atomic command runs the nexus container, it reads the command line associated with the selected option
|
||||
from a LABEL set within the Docker container itself. It then runs that command. The following sections detail
|
||||
each option and associated LABEL:
|
||||
.SH SECURITY IMPLICATIONS
|
||||
.PP
|
||||
\fB\fC\-d\fR
|
||||
.PP
|
||||
Runs continuously as a daemon process in the background
|
||||
72
rh-docker/help.md
Normal file
72
rh-docker/help.md
Normal file
@@ -0,0 +1,72 @@
|
||||
% NEXUS(1) Container Image Pages
|
||||
% Sonatype
|
||||
% December 15, 2017
|
||||
|
||||
# NAME
|
||||
nexus \- Nexus Repository Manager container image
|
||||
|
||||
# DESCRIPTION
|
||||
The nexus image provides a containerized packaging of the Nexus Repository Manager.
|
||||
Nexus Repository Manager is a repository manager with universal support for popular component formats including Maven, Docker, NuGet, npm, PyPi, Bower and more.
|
||||
|
||||
The nexus image is designed to be run by the atomic command with one of these options:
|
||||
|
||||
`run`
|
||||
|
||||
Starts the installed container with selected privileges to the host.
|
||||
|
||||
`stop`
|
||||
|
||||
Stops the installed container
|
||||
|
||||
The container itself consists of:
|
||||
- Linux base image
|
||||
- Java OpenJDK
|
||||
- Nexus Repository Manager
|
||||
- Atomic help file
|
||||
|
||||
Files added to the container during docker build include: /help.1.
|
||||
|
||||
# USAGE
|
||||
To use the nexus container, you can run the atomic command with run, stop, or uninstall options:
|
||||
|
||||
To run the nexus container:
|
||||
|
||||
atomic run nexus
|
||||
|
||||
To stop the nexus container (after it is installed), run:
|
||||
|
||||
atomic stop nexus
|
||||
|
||||
# LABELS
|
||||
The nexus container includes the following LABEL settings:
|
||||
|
||||
That atomic command runs the docker command set in this label:
|
||||
|
||||
`RUN=`
|
||||
|
||||
LABEL RUN='docker run -d -p 8081:8081 --name ${NAME} ${IMAGE}'
|
||||
|
||||
The contents of the RUN label tells an `atomic run nexus` command to open port 8081 & set the name of the container.
|
||||
|
||||
`STOP=`
|
||||
|
||||
LABEL STOP='docker stop ${NAME}'
|
||||
|
||||
`Name=`
|
||||
|
||||
The registry location and name of the image. For example, Name="Nexus Repository Manager".
|
||||
|
||||
`Version=`
|
||||
|
||||
The Nexus Repository Manager version from which the container was built. For example, Version="3.6.2-01".
|
||||
|
||||
When the atomic command runs the nexus container, it reads the command line associated with the selected option
|
||||
from a LABEL set within the Docker container itself. It then runs that command. The following sections detail
|
||||
each option and associated LABEL:
|
||||
|
||||
# SECURITY IMPLICATIONS
|
||||
|
||||
`-d`
|
||||
|
||||
Runs continuously as a daemon process in the background
|
||||
10
rh-docker/licenses/LICENSE
Normal file
10
rh-docker/licenses/LICENSE
Normal file
@@ -0,0 +1,10 @@
|
||||
Sonatype Nexus (TM) Open Source Version
|
||||
Copyright (c) 2008-present Sonatype, Inc.
|
||||
All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
|
||||
|
||||
This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
|
||||
which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
|
||||
|
||||
Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
|
||||
of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
|
||||
Eclipse Foundation. All other trademarks are the property of their respective owners.
|
||||
11
rh-docker/uid_entrypoint.sh
Normal file
11
rh-docker/uid_entrypoint.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright:: Copyright (c) 2017-present Sonatype, Inc. Apache License, Version 2.0.
|
||||
#
|
||||
# arbitrary uid recognition at runtime - for OpenShift deployments
|
||||
USER_ID=$(id -u)
|
||||
if [[ ${USER_UID} != ${USER_ID} ]]; then
|
||||
sed "s@${USER_NAME}:x:\${USER_ID}:@${USER_NAME}:x:${USER_ID}:@g" /etc/passwd.template > /etc/passwd
|
||||
fi
|
||||
exec "$@"
|
||||
|
||||
6
rh-docker/uid_template.sh
Normal file
6
rh-docker/uid_template.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright:: Copyright (c) 2017-present Sonatype, Inc. Apache License, Version 2.0.
|
||||
#
|
||||
# arbitrary uid recognition at runtime - for OpenShift deployments
|
||||
sed "s@${USER_NAME}:x:${USER_UID}:@${USER_NAME}:x:\${USER_ID}:@g" /etc/passwd > /etc/passwd.template
|
||||
Reference in New Issue
Block a user