File tree 4 files changed +62
-8
lines changed
4 files changed +62
-8
lines changed Original file line number Diff line number Diff line change 1
1
.dockerignore
2
2
Dockerfile
3
3
vendor /
4
- cve.sqlite3 *
5
- oval.sqlite3 *
4
+ * .sqlite3 *
6
5
setup /
7
- img /
6
+ img /
Original file line number Diff line number Diff line change @@ -20,26 +20,48 @@ jobs:
20
20
- name : Set up Docker Buildx
21
21
uses : docker/setup-buildx-action@v1
22
22
23
- - name : Docker meta
24
- id : meta
23
+ - name : vuls/vuls image meta
24
+ id : oss- meta
25
25
uses : docker/metadata-action@v3
26
26
with :
27
27
images : vuls/vuls
28
28
tags : |
29
29
type=ref,event=tag
30
30
31
+ - name : vuls/fvuls image meta
32
+ id : fvuls-meta
33
+ uses : docker/metadata-action@v3
34
+ with :
35
+ images : vuls/fvuls
36
+ tags : |
37
+ type=ref,event=tag
38
+
31
39
- name : Login to DockerHub
32
40
uses : docker/login-action@v1
33
41
with :
34
42
username : ${{ secrets.DOCKERHUB_USERNAME }}
35
43
password : ${{ secrets.DOCKERHUB_TOKEN }}
36
44
37
- - name : Build and push
45
+ - name : OSS image build and push
38
46
uses : docker/build-push-action@v2
39
47
with :
48
+ context : .
49
+ file : ./Dockerfile
40
50
push : true
41
51
tags : |
42
52
vuls/vuls:latest
43
- ${{ steps.meta.outputs.tags }}
53
+ ${{ steps.oss-meta.outputs.tags }}
54
+ secrets : |
55
+ "github_token=${{ secrets.GITHUB_TOKEN }}"
56
+
57
+ - name : FutureVuls image build and push
58
+ uses : docker/build-push-action@v2
59
+ with :
60
+ context : .
61
+ file : ./contrib/Dockerfile
62
+ push : true
63
+ tags : |
64
+ vuls/fvuls:latest
65
+ ${{ steps.fvuls-meta.outputs.tags }}
44
66
secrets : |
45
67
"github_token=${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ENV REPOSITORY github.com/future-architect/vuls
10
10
COPY . $GOPATH/src/$REPOSITORY
11
11
RUN cd $GOPATH/src/$REPOSITORY && make install
12
12
13
- FROM alpine:3.14
13
+ FROM alpine:3.15
14
14
15
15
ENV LOGDIR /var/log/vuls
16
16
ENV WORKDIR /vuls
Original file line number Diff line number Diff line change
1
+ FROM golang:alpine as builder
2
+
3
+ RUN apk add --no-cache \
4
+ git \
5
+ make \
6
+ gcc \
7
+ musl-dev
8
+ RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.0
9
+
10
+ ENV REPOSITORY github.com/future-architect/vuls
11
+ COPY . $GOPATH/src/$REPOSITORY
12
+ RUN cd $GOPATH/src/$REPOSITORY && \
13
+ make build-scanner && mv vuls $GOPATH/bin && \
14
+ make build-trivy-to-vuls && mv trivy-to-vuls $GOPATH/bin && \
15
+ make build-future-vuls && mv future-vuls $GOPATH/bin
16
+
17
+ FROM alpine:3.15
18
+
19
+ ENV LOGDIR /var/log/vuls
20
+ ENV WORKDIR /vuls
21
+
22
+ RUN apk add --no-cache \
23
+ openssh-client \
24
+ ca-certificates \
25
+ git \
26
+ nmap \
27
+ && mkdir -p $WORKDIR $LOGDIR
28
+
29
+ COPY --from=builder /go/bin/vuls /go/bin/trivy-to-vuls /go/bin/future-vuls /usr/local/bin/
30
+
31
+ VOLUME ["$WORKDIR" , "$LOGDIR" ]
32
+ WORKDIR $WORKDIR
33
+ ENV PWD $WORKDIR
You can’t perform that action at this time.
0 commit comments