-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (27 loc) · 883 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Sonatype Nexus Ahab Evaluation
FROM alpine as ahab
LABEL stage=AHAB
RUN apk add --no-cache curl
WORKDIR /tmp/ahab
RUN curl -o ahab -O -L https://github.com/sonatype-nexus-community/ahab/releases/download/v0.2.5/ahab-linux.amd64-v0.2.5
FROM tomcat as build_jre
RUN mkdir /work
WORKDIR /work
COPY . /work
RUN ./mvnw clean package
FROM tomcat
LABEL nexus_scan="true"
RUN apt-get update && apt-get install -y ca-certificates && apt-get upgrade -y
# Sonatype Nexus Ahab Evaluation
ARG IQ_TOKEN
ARG IQ_USER
ARG IQ_SERVER
ARG IQ_STAGE
COPY --from=ahab /tmp/ahab /tmp/
#RUN chmod +x /tmp/ahab \
# && dpkg-query --show --showformat='${Package} ${Version}\n' | /tmp/ahab chase
RUN set -ex \
&& rm -rf /usr/local/tomcat/webapps/* \
&& chmod a+x /usr/local/tomcat/bin/*.sh
COPY --from=build_jre /work/target/struts2-rest-showcase.war /usr/local/tomcat/webapps/ROOT.war
EXPOSE 8080