You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build a dynamic image for nexus with composer plugin
What feature or behavior is this required for?
Easy updates of the image to newer versions and migrations, template for future releases.
How could we solve this issue? (Not knowing is okay!)
Currently the image builds correctly, however the recepies for composer repositories are not present in the Nexus repository manager UI. However we are using the latest version of sonatype/nexus3 version with java8 and the latest compose plugin version of 0.0.29. Is there a limit on which nexus3 image the composer works?
Here is the current Dockerfile that I`m using:
ARG NEXUS_VERSION=3.69.0-java8
FROM sonatype/nexus3:${NEXUS_VERSION}
ARG COMPOSER_PLUGIN_VERSION=0.0.29
USER root
# Install necessary tools using microdnfRUN microdnf install -y curl unzip && microdnf clean all
# Define plugin pathsENV NEXUS_DIR=/opt/sonatype/nexus
ENV COMPOSER_PLUGIN_PATH=${NEXUS_DIR}/system/org/sonatype/nexus/plugins/nexus-repository-composer/${COMPOSER_PLUGIN_VERSION}
ENV NEXUS_CORE_FEATURE_PATH=${NEXUS_DIR}/system/org/sonatype/nexus/assemblies/nexus-core-feature
# Create necessary directories and set permissionsRUN mkdir -p ${COMPOSER_PLUGIN_PATH}
# Download and install the Composer pluginRUN curl -L -o ${COMPOSER_PLUGIN_PATH}/nexus-repository-composer-${COMPOSER_PLUGIN_VERSION}.jar \
https://github.com/sonatype-nexus-community/nexus-repository-composer/releases/download/${COMPOSER_PLUGIN_VERSION}/nexus-repository-composer-${COMPOSER_PLUGIN_VERSION}.jar
# Update the plugin configuration in the features.xml file as rootRUN for FEATURES_XML in ${NEXUS_CORE_FEATURE_PATH}/*/nexus-core-feature-*-features.xml; do \
sed -i '/<feature name="nexus-core-feature"/a\ <feature prerequisite="false" dependency="false">nexus-repository-composer</feature>' $FEATURES_XML && \
sed -i '/<\/features>/i\ <feature name="nexus-repository-composer" description="org.sonatype.nexus.plugins:nexus-repository-composer" version="'${COMPOSER_PLUGIN_VERSION}'">\n <details>org.sonatype.nexus.plugins:nexus-repository-composer</details>\n <bundle>mvn:org.sonatype.nexus.plugins/nexus-repository-composer/'${COMPOSER_PLUGIN_VERSION}'</bundle>\n </feature>' $FEATURES_XML; \
done
# Change ownership back to nexus userRUN chown -R nexus:nexus ${NEXUS_DIR}/system/org/sonatype/nexus/plugins && \
chown -R nexus:nexus ${NEXUS_DIR}/system/org/sonatype/nexus/assemblies
USER nexus
EXPOSE 8081
ENTRYPOINT ["/opt/sonatype/nexus/bin/nexus", "run"]
Thanks for the help it is very much appreciated 😄
The text was updated successfully, but these errors were encountered:
What are you trying to do?
Build a dynamic image for nexus with composer plugin
What feature or behavior is this required for?
Easy updates of the image to newer versions and migrations, template for future releases.
How could we solve this issue? (Not knowing is okay!)
Currently the image builds correctly, however the recepies for composer repositories are not present in the Nexus repository manager UI. However we are using the latest version of sonatype/nexus3 version with java8 and the latest compose plugin version of 0.0.29. Is there a limit on which nexus3 image the composer works?
Here is the current Dockerfile that I`m using:
Thanks for the help it is very much appreciated 😄
The text was updated successfully, but these errors were encountered: