This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
forked from sonatype-nexus-community/nexus-repository-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
21 lines (18 loc) · 1.57 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ARG NEXUS_VERSION=3.15.2
FROM maven:3-jdk-8-alpine AS build
ARG NEXUS_VERSION=3.15.2
ARG NEXUS_BUILD=01
COPY . /nexus-repository-helm/
RUN cd /nexus-repository-helm/; sed -i "s/3.15.2-01/${NEXUS_VERSION}-${NEXUS_BUILD}/g" pom.xml; \
mvn clean package;
FROM sonatype/nexus3:$NEXUS_VERSION
ARG NEXUS_VERSION=3.15.2
ARG NEXUS_BUILD=01
ARG HELM_VERSION=0.0.8
ARG TARGET_DIR=/opt/sonatype/nexus/system/org/sonatype/nexus/plugins/nexus-repository-helm/${HELM_VERSION}/
USER root
RUN mkdir -p ${TARGET_DIR}; \
sed -i 's@nexus-repository-maven</feature>@nexus-repository-maven</feature>\n <feature prerequisite="false" dependency="false">nexus-repository-helm</feature>@g' /opt/sonatype/nexus/system/org/sonatype/nexus/assemblies/nexus-core-feature/${NEXUS_VERSION}-${NEXUS_BUILD}/nexus-core-feature-${NEXUS_VERSION}-${NEXUS_BUILD}-features.xml; \
sed -i 's@<feature name="nexus-repository-maven"@<feature name="nexus-repository-helm" description="org.sonatype.nexus.plugins:nexus-repository-helm" version="0.0.8">\n <details>org.sonatype.nexus.plugins:nexus-repository-helm</details>\n <bundle>mvn:org.sonatype.nexus.plugins/nexus-repository-helm/0.0.8</bundle>\n <bundle>mvn:org.apache.commons/commons-compress/1.18</bundle>\n </feature>\n <feature name="nexus-repository-maven"@g' /opt/sonatype/nexus/system/org/sonatype/nexus/assemblies/nexus-core-feature/${NEXUS_VERSION}-${NEXUS_BUILD}/nexus-core-feature-${NEXUS_VERSION}-${NEXUS_BUILD}-features.xml;
COPY --from=build /nexus-repository-helm/target/nexus-repository-helm-${HELM_VERSION}.jar ${TARGET_DIR}
USER nexus