This repository was archived by the owner on Sep 27, 2019. It is now read-only.
File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ ARG NEXUS_VERSION=3.6.0
2
+
3
+ FROM maven:3-jdk-8-alpine AS build
4
+ ARG NEXUS_VERSION=3.6.0
5
+ ARG NEXUS_BUILD=02
6
+
7
+ COPY . /nexus-repository-apt/
8
+ RUN cd /nexus-repository-apt/; sed -i "s/3.5.0-02/${NEXUS_VERSION}-${NEXUS_BUILD}/g" pom.xml; \
9
+ mvn;
10
+
11
+ FROM sonatype/nexus3:$NEXUS_VERSION
12
+ ARG NEXUS_VERSION=3.6.0
13
+ ARG NEXUS_BUILD=02
14
+ USER root
15
+ RUN mkdir /opt/sonatype/nexus/system/net/staticsnow/ /opt/sonatype/nexus/system/net/staticsnow/nexus-repository-apt/ /opt/sonatype/nexus/system/net/staticsnow/nexus-repository-apt/1.0.2/; \
16
+ sed -i 's@nexus-repository-npm</feature>@nexus-repository-npm</feature>\n <feature prerequisite="false" dependency="false">nexus-repository-apt</feature>@g' /opt/sonatype/nexus/system/com/sonatype/nexus/assemblies/nexus-oss-feature/${NEXUS_VERSION}-${NEXUS_BUILD}/nexus-oss-feature-${NEXUS_VERSION}-${NEXUS_BUILD}-features.xml; \
17
+ sed -i 's@<feature name="nexus-repository-npm"@<feature name="nexus-repository-apt" description="net.staticsnow:nexus-repository-apt" version="1.0.2">\n <details>net.staticsnow:nexus-repository-apt</details>\n <bundle>mvn:net.staticsnow/nexus-repository-apt/1.0.2</bundle>\n </feature>\n <feature name="nexus-repository-npm"@g' /opt/sonatype/nexus/system/com/sonatype/nexus/assemblies/nexus-oss-feature/${NEXUS_VERSION}-${NEXUS_BUILD}/nexus-oss-feature-${NEXUS_VERSION}-${NEXUS_BUILD}-features.xml;
18
+ COPY --from=build /nexus-repository-apt/target/nexus-repository-apt-1.0.2.jar /opt/sonatype/nexus/system/net/staticsnow/nexus-repository-apt/1.0.2/
19
+ USER nexus
Original file line number Diff line number Diff line change 10
10
cd nexus-repository
11
11
mvn
12
12
```
13
+ ### Build with docker and create an image based on nexus repository 3
14
+
15
+ ``` docker build -t nexus-repository-apt:3.6.0 . ```
16
+
17
+ ### Run a docker container from that image
18
+
19
+ ``` docker run -d -p 8081:8081 --name nexus-repository-apt:3.6.0 ```
20
+
21
+ For further information like how to persist volumes view https://github.com/sonatype/docker-nexus3
22
+ The application is now available from the browser on localhost:8081
13
23
14
24
### Install
15
25
* Stop Nexus:
You can’t perform that action at this time.
0 commit comments