Skip to content

Commit 04f246c

Browse files
authored
chore: add fvuls image (future-architect#1426)
1 parent 7500f41 commit 04f246c

File tree

4 files changed

+62
-8
lines changed

4 files changed

+62
-8
lines changed

.dockerignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.dockerignore
22
Dockerfile
33
vendor/
4-
cve.sqlite3*
5-
oval.sqlite3*
4+
*.sqlite3*
65
setup/
7-
img/
6+
img/

.github/workflows/docker-publish.yml

+26-4
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,48 @@ jobs:
2020
- name: Set up Docker Buildx
2121
uses: docker/setup-buildx-action@v1
2222

23-
- name: Docker meta
24-
id: meta
23+
- name: vuls/vuls image meta
24+
id: oss-meta
2525
uses: docker/metadata-action@v3
2626
with:
2727
images: vuls/vuls
2828
tags: |
2929
type=ref,event=tag
3030
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+
3139
- name: Login to DockerHub
3240
uses: docker/login-action@v1
3341
with:
3442
username: ${{ secrets.DOCKERHUB_USERNAME }}
3543
password: ${{ secrets.DOCKERHUB_TOKEN }}
3644

37-
- name: Build and push
45+
- name: OSS image build and push
3846
uses: docker/build-push-action@v2
3947
with:
48+
context: .
49+
file: ./Dockerfile
4050
push: true
4151
tags: |
4252
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 }}
4466
secrets: |
4567
"github_token=${{ secrets.GITHUB_TOKEN }}"

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV REPOSITORY github.com/future-architect/vuls
1010
COPY . $GOPATH/src/$REPOSITORY
1111
RUN cd $GOPATH/src/$REPOSITORY && make install
1212

13-
FROM alpine:3.14
13+
FROM alpine:3.15
1414

1515
ENV LOGDIR /var/log/vuls
1616
ENV WORKDIR /vuls

contrib/Dockerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

0 commit comments

Comments
 (0)