Note: This utilizes a multi-stage build and requires Docker 17.05 or newer. The Docker image is also available from Docker Hub
docker build -t mirantis/get-dtr-cve-db:latest .
Default run command with all default environment variables specified:
docker run -it --rm \
-v ${HOME}/Downloads:/data \
-e CVE_DB_URL_ONLY=false \
-e CLOBBER_FILE=false \
-e DATABASE_OUTPUT="/data" \
-e DATABASE_SCHEMA=3 \
-e DEBUG=false \
-e VERSION_ONLY=false \
mirantis/get-dtr-cve-db:latest
Using the above example, if I want the container to output the database file to ~/Downloads
, the above command will work as expected because the volume is being mapped from my machine into the container. If the destination for the database exists in a separate directory, you would need an additional volume defined.
Note: these are the values inside the container. You must pass the actual parent directories as one or more volumes.
CLOBBER_FILE
- defaults tofalse
- Set to
true
to overwrite an existing file of the same database name
- Set to
CVE_DB_URL_ONLY
- defaults tofalse
- Set to
true
to output the CVE database URL; does not download the CVE database
- Set to
DATABASE_OUTPUT
- defaults to/data
- Specifies the directory to where the database will be downloaded inside the container
DATABASE_SCHEMA
- defaults to2
1
- DTR 2.2.5 or lower2
- DTR 2.3.x; 2.4.x; 2.5.15 or lower; 2.6.11 or lower; 2.7.4 or lower3
- DTR 2.5.16 or higher; 2.6.12 or higher; 2.7.5 or higher
DEBUG
- defaults tofalse
- Set to
true
to execute the script withset -x
- Set to
VERSION_ONLY
- defaults tofalse
- Set to
true
to output the CVE database version number; does not download the CVE database
- Set to