我已将 docker 映像从私有存储库拉到本地,并尝试使用 trivy image 命令扫描本地映像。它正在拉取数据库,但显示访问本地映像时出现未经授权的错误
scan error: unable to initialize a scanner: unable to initialize a docker scanner: 3 errors occurred:
* unable to inspect the image (index.docker.io/library/58625f3e2b28:latest): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
* unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
* GET https://index.docker.io/v2/library/58625f3e2b28/manifests/latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/58625f3e2b28 Type:repository]]
Run Code Online (Sandbox Code Playgroud)
Docker deamon 正在运行,镜像也在本地。Trivy 版本:0.22.0
我正在将 Trivy 作为 docker 容器运行,并使用以下命令扫描本地图像
docker run …Run Code Online (Sandbox Code Playgroud) 在我的弹性搜索索引中,每个文档将有两个日期字段createdDate和modifiedDate。modifiedDate我正在尝试在 kibana 中添加一个过滤器来获取大于 的文档createdDate。如何在 kibana 中创建这个过滤器?
尝试使用下面的查询而不是大于它被视为 gte 并获取所有记录
GET index/_search
{
"query": {
"bool": {
"filter": {
"script": {
"script" : {
"inline" : "doc['modifiedTime'].value.getMillis() > doc['createdTime'].value.getMillis()",
"lang" : "painless"
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)