Skip to content
Snippets Groups Projects
Commit e1b70428 authored by Thibault's avatar Thibault
Browse files

Modification scan clair

parent 32ba7756
No related branches found
No related tags found
No related merge requests found
...@@ -27,21 +27,11 @@ node{ ...@@ -27,21 +27,11 @@ node{
stage('Scan Clair'){ stage('Scan Clair'){
sh ''' sh '''
docker run -d --name db arminc/clair-db wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner
sleep 15 # wait for db to come up ./clair-scanner --ip="http://172.20.0.6" -c 127.0.0.1 debian:buster || exit 0
docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan '''
sleep 1
DOCKER_GATEWAY=$(docker network inspect bridge --format "{{range .IPAM.Config}}{{.Gateway}}{{end}}")
wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner
./clair-scanner --ip="http://172.17.0.1" -c 127.0.0.1 debian:buster || exit 0
'''
}
stage('Delete moi tous la dedans jveux plus rien reconnaitre'){
sh 'docker stop db'
sh 'docker stop clair'
sh 'docker rm db'
sh 'docker rm clair'
} }
stage('Push on repo nexus'){ stage('Push on repo nexus'){
docker.withRegistry(registryProject,'reg2'){ docker.withRegistry(registryProject,'reg2'){
img.push 'latest' img.push 'latest'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment