Merge pull request #223 from sadayuki-matsuno/remove_base_image
remove base docker image
This commit is contained in:
@@ -26,7 +26,9 @@ This image version is same as the github repository version.
|
||||
```console
|
||||
$ for i in {2002..2016}; do \
|
||||
docker run --rm -it \
|
||||
-v $PWD:/vuls vuls/go-cve-dictionary fetchnvd -years $i; \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/go-cve-dictionary-log:/var/log/vuls \
|
||||
vuls/go-cve-dictionary fetchnvd -years $i; \
|
||||
done
|
||||
```
|
||||
|
||||
@@ -49,6 +51,7 @@ keyPath = "/root/.ssh/id_rsa" # path to ssh private key in docker
|
||||
$ docker run --rm \
|
||||
-v ~/.ssh:/root/.ssh:ro \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
vuls/vuls configtest \
|
||||
-config=./config.toml # path to config.toml in docker
|
||||
```
|
||||
@@ -59,6 +62,7 @@ $ docker run --rm \
|
||||
$ docker run --rm \
|
||||
-v ~/.ssh:/root/.ssh:ro \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
vuls/vuls prepare \
|
||||
-config=./config.toml # path to config.toml in docker
|
||||
```
|
||||
@@ -69,6 +73,7 @@ $ docker run --rm \
|
||||
$ docker run --rm -it \
|
||||
-v ~/.ssh:/root/.ssh:ro \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-e "TZ=Asia/Tokyo" \
|
||||
vuls/vuls scan \
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM golang:1.7.1
|
||||
|
||||
MAINTAINER hikachan sadayuki-matsuno
|
||||
|
||||
# glide install
|
||||
ENV GLIDE_VERSION 0.12.2
|
||||
ENV GLIDE_DOWNLOAD_URL https://github.com/Masterminds/glide/releases/download/v$GLIDE_VERSION/glide-v$GLIDE_VERSION-linux-amd64.tar.gz
|
||||
RUN curl -fsSL "$GLIDE_DOWNLOAD_URL" -o glide.tar.gz \
|
||||
&& mkdir /usr/local/glide \
|
||||
&& tar -C /usr/local/glide -xzf glide.tar.gz \
|
||||
&& ln -s /usr/local/glide/linux-amd64/glide /usr/local/bin/ \
|
||||
&& rm glide.tar.gz
|
||||
@@ -1,19 +0,0 @@
|
||||
# Vuls-Base-Docker
|
||||
|
||||
This is the Git repo of the official Docker image for vuls-base.
|
||||
See the [Hub page](https://hub.docker.com/r/vuls/vuls-base/) for the full readme on how to use the Docker image and for information regarding contributing and issues.
|
||||
|
||||
# Supported tags and respective `Dockerfile` links
|
||||
|
||||
- [`latest` (*vuls-base:latest Dockerfile*)](https://github.com/future-architect/vuls/blob/master/setup/docker/base/latest/Dockerfile)
|
||||
|
||||
# Caution
|
||||
|
||||
This image is built per commit.
|
||||
If you want to use the latest docker image, you should remove the existing image, and pull it once again.
|
||||
|
||||
|
||||
# What is vuls-base?
|
||||
|
||||
Base images of vuls and go-cve-dictionary.
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
FROM vuls/vuls-base:latest
|
||||
FROM golang:latest
|
||||
|
||||
MAINTAINER hikachan sadayuki-matsuno
|
||||
|
||||
ENV REPOSITORY github.com/kotakanbe/go-cve-dictionary
|
||||
ENV LOGDIR /var/log/vuls
|
||||
ENV WORKDIR /vuls
|
||||
# go-cve-dictionary install
|
||||
RUN git clone https://$REPOSITORY.git $GOPATH/src/$REPOSITORY \
|
||||
&& cd $GOPATH/src/$REPOSITORY \
|
||||
&& glide install \
|
||||
&& go build \
|
||||
&& mv $GOPATH/src/$REPOSITORY/go-cve-dictionary /usr/local/bin \
|
||||
&& chmod +x /usr/local/bin/go-cve-dictionary \
|
||||
&& mkdir -p /var/log/vuls
|
||||
&& make install \
|
||||
&& mkdir -p $LOGDIR
|
||||
|
||||
VOLUME $WORKDIR
|
||||
VOLUME [$WORKDIR, $LOGDIR]
|
||||
WORKDIR $WORKDIR
|
||||
ENV PWD $WORKDIR
|
||||
|
||||
|
||||
@@ -22,12 +22,19 @@ This is tool to build a local copy of the NVD (National Vulnerabilities Database
|
||||
|
||||
# How to use this image
|
||||
|
||||
## check vuls version
|
||||
|
||||
```
|
||||
$ docker run --rm vuls/go-cve-dictionary -v
|
||||
```
|
||||
|
||||
## fetchnvd
|
||||
|
||||
```console
|
||||
$ for i in {2002..2016}; do \
|
||||
docker run --rm -it \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/go-cve-dictionary-log:/var/log/vuls \
|
||||
vuls/go-cve-dictionary fetchnvd -years $i; \
|
||||
done
|
||||
```
|
||||
@@ -36,11 +43,12 @@ $ for i in {2002..2016}; do \
|
||||
|
||||
```console
|
||||
$ docker run -dt \
|
||||
--name go-cve-dictionary \
|
||||
-v $PWD:/vuls \
|
||||
--expose 1323 \
|
||||
-p 1323:1323 \
|
||||
vuls/go-cve-dictionary server --bind=0.0.0.0
|
||||
--name go-cve-dictionary \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/go-cve-dictionary-log:/var/log/vuls \
|
||||
--expose 1323 \
|
||||
-p 1323:1323 \
|
||||
vuls/go-cve-dictionary server --bind=0.0.0.0
|
||||
```
|
||||
|
||||
Prease refer to [this](https://hub.docker.com/r/vuls/go-cve-dictionary).
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
FROM vuls/vuls-base:latest
|
||||
FROM golang:latest
|
||||
|
||||
MAINTAINER hikachan sadayuki-matsuno
|
||||
|
||||
ENV REPOSITORY github.com/future-architect/vuls
|
||||
ENV LOGDIR /var/log/vuls
|
||||
ENV WORKDIR /vuls
|
||||
# go-cve-dictionary install
|
||||
RUN git clone https://$REPOSITORY.git $GOPATH/src/$REPOSITORY \
|
||||
&& cd $GOPATH/src/$REPOSITORY \
|
||||
&& glide install \
|
||||
&& go build \
|
||||
&& mv $GOPATH/src/$REPOSITORY/vuls /usr/local/bin \
|
||||
&& mkdir -p /var/log/vuls \
|
||||
&& chmod +x /usr/local/bin/vuls
|
||||
&& make install \
|
||||
&& mkdir -p $LOGDIR
|
||||
|
||||
VOLUME $WORKDIR
|
||||
VOLUME [$WORKDIR, $LOGDIR]
|
||||
WORKDIR $WORKDIR
|
||||
ENV PWD $WORKDIR
|
||||
|
||||
|
||||
@@ -21,6 +21,12 @@ Please see the [Documentation](https://github.com/future-architect/vuls)
|
||||
|
||||
# How to use this image
|
||||
|
||||
## check vuls version
|
||||
|
||||
```
|
||||
$ docker run --rm vuls/vuls -v
|
||||
```
|
||||
|
||||
## configtest
|
||||
|
||||
Create config.toml referring to [this](https://github.com/future-architect/vuls#configuration).
|
||||
@@ -40,6 +46,7 @@ keyPath = "/root/.ssh/id_rsa" # path to ssh private key in docker
|
||||
$ docker run --rm \
|
||||
-v ~/.ssh:/root/.ssh:ro \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
vuls/vuls configtest
|
||||
```
|
||||
|
||||
@@ -50,6 +57,7 @@ $ docker run --rm \
|
||||
$ docker run --rm \
|
||||
-v ~/.ssh:/root/.ssh:ro \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
vuls/vuls prepare \
|
||||
-config=./config.toml # path to config.toml in docker
|
||||
```
|
||||
@@ -60,6 +68,7 @@ $ docker run --rm \
|
||||
$ docker run --rm -it \
|
||||
-v ~/.ssh:/root/.ssh:ro \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
vuls/vuls scan \
|
||||
-cve-dictionary-dbpath=/vuls/cve.sqlite3 \
|
||||
@@ -72,6 +81,7 @@ $ docker run --rm -it \
|
||||
```console
|
||||
$ docker run --rm -it \
|
||||
-v $PWD:/vuls \
|
||||
-v $PWD/vuls-log:/var/log/vuls \
|
||||
vuls/vuls tui
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user