-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile-complete
43 lines (36 loc) · 1.73 KB
/
Dockerfile-complete
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
38
39
40
41
42
43
# Dockerfile used to build the foxsec-pipeline image.
#
# This is the complete image, based off the base image but also containing
# source code and compiled classes.
FROM foxsec-pipeline-base:latest
# Add a set of layers to the image that act as a dependency cache; copy just
# what is required to resolve the dependencies such that the cache will be
# invalidated if the dependencies change.
COPY contrib/go.* /root/project/contrib/
COPY contrib/auth0pull/go.* /root/project/contrib/auth0pull/
COPY contrib/bugzilla-alert-manager/go.* /root/project/contrib/bugzilla-alert-manager/
COPY contrib/cloudtrail-streamer/go.* /root/project/contrib/cloudtrail-streamer/
COPY contrib/duopull/go.* /root/project/contrib/duopull/
COPY contrib/slackbot-background/go.* /root/project/contrib/slackbot-background/
COPY contrib/slackbot-http/go.* /root/project/contrib/slackbot-http/
COPY pom.xml /root/project/pom.xml
RUN mvn -B dependency:resolve dependency:resolve-plugins dependency:go-offline && \
cd contrib && go mod download && \
(cd auth0pull && go mod download) && \
(cd bugzilla-alert-manager && go mod download) && \
(cd cloudtrail-streamer && go mod download) && \
(cd duopull && go mod download) && \
(cd slackbot-background && go mod download) && \
(cd slackbot-http && go mod download)
COPY . /root/project
RUN mvn -B javadoc:javadoc && mvn -B package -Dmaven.test.skip=true
RUN cd contrib && \
(cd auth0pull && go build) && \
(cd bugzilla-alert-manager && go build) && \
(cd cloudtrail-streamer && go build) && \
(cd duopull && go build) && \
(cd slackbot-background && go build) && \
(cd slackbot-http && go build)
RUN mkdir -p /app && cp version.json /app/version.json
ENV FOXSEC_PIPELINE_IMAGE complete
ENTRYPOINT ["/docker-entrypoint.sh"]