-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
026777a
commit 0e5f6e0
Showing
4 changed files
with
95 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
FROM sonatype/nexus3 | ||
FROM openjdk:8 as builder | ||
|
||
COPY . . | ||
RUN ./gradlew jar | ||
|
||
#FROM sonatype/nexus3:3.49.0 | ||
FROM klo2k/nexus3 | ||
#docker build . -t nex --platform linux/arm64/v8 | ||
#export DOCKER_DEFAULT_PLATFORM=linux/arm64/v8 | ||
#docker run -v $PWD/nexus-data:/nexus-data -p 8081:8081 nex | ||
#Nexus 3 version to use | ||
ARG NEXUS_VERSION=3.6.0 | ||
ARG RUNDECK_PLUGIN_VERSION=1.0.1 | ||
ARG NEXUS_VERSION=3.49.0 | ||
ARG RUNDECK_PLUGIN_VERSION=1.1.0 | ||
|
||
USER root | ||
|
||
# Stop Nexus 3 | ||
CMD ["bin/nexus", "stop"] | ||
#CMD ["bin/nexus", "stop"] | ||
|
||
# Copy and Configure Nexus Rundeck Plugin | ||
RUN mkdir -p system/com/nongfenqi/nexus/plugin/${RUNDECK_PLUGIN_VERSION} | ||
|
||
ADD build/libs/nexus3-rundeck-plugin-${RUNDECK_PLUGIN_VERSION}.jar \ | ||
system/com/nongfenqi/nexus/plugin/${RUNDECK_PLUGIN_VERSION}/nexus3-rundeck-plugin-${RUNDECK_PLUGIN_VERSION}.jar | ||
RUN chmod 644 system/com/nongfenqi/nexus/plugin/${RUNDECK_PLUGIN_VERSION}/nexus3-rundeck-plugin-${RUNDECK_PLUGIN_VERSION}.jar | ||
|
||
RUN echo "bundle.mvn\:com.nongfenqi.nexus.plugin/nexus3-rundeck-plugin/"${RUNDECK_PLUGIN_VERSION}" = mvn:com.nongfenqi.nexus.plugin/nexus3-rundeck-plugin/"${RUNDECK_PLUGIN_VERSION} \ | ||
>> etc/karaf/profile.cfg \ | ||
&& echo "reference\:file\:com/nongfenqi/nexus/plugin/"${RUNDECK_PLUGIN_VERSION}"/nexus3-rundeck-plugin-"${RUNDECK_PLUGIN_VERSION}".jar = 200" \ | ||
>> etc/karaf/startup.properties | ||
COPY --from=builder build/libs/nexus3-rundeck-plugin-${RUNDECK_PLUGIN_VERSION}.jar \ | ||
$NEXUS_HOME/system/com/nongfenqi/nexus/plugin/${RUNDECK_PLUGIN_VERSION}/nexus3-rundeck-plugin-${RUNDECK_PLUGIN_VERSION}.jar | ||
|
||
|
||
RUN chmod 644 $NEXUS_HOME/system/com/nongfenqi/nexus/plugin/$RUNDECK_PLUGIN_VERSION/nexus3-rundeck-plugin-$RUNDECK_PLUGIN_VERSION.jar \ | ||
&& echo "bundle.mvn\:com.nongfenqi.nexus.plugin/nexus3-rundeck-plugin/$RUNDECK_PLUGIN_VERSION = mvn:com.nongfenqi.nexus.plugin/nexus3-rundeck-plugin/$RUNDECK_PLUGIN_VERSION" >> $NEXUS_HOME/etc/karaf/profile.cfg \ | ||
&& echo "reference\:file\:com/nongfenqi/nexus/plugin/$RUNDECK_PLUGIN_VERSION/nexus3-rundeck-plugin-$RUNDECK_PLUGIN_VERSION.jar = 200" >> $NEXUS_HOME/etc/karaf/startup.properties | ||
|
||
USER nexus | ||
|
||
# Start Nexus 3 | ||
CMD ["bin/nexus", "run"] | ||
#CMD ["bin/nexus", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters