mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-27 11:07:46 +01:00
Update Clair offiline date guide
This commit is contained in:
parent
19a5591ef5
commit
bfb0c0a32d
@ -1,4 +1,4 @@
|
||||
## Guild for update clair offline data
|
||||
## Guild for update Clair offline data
|
||||
### Summary
|
||||
|
||||
In some case when user install harbor in an environment without internet access. Then Clair will not be able to fetch the latest vulnerability database. In this circumstance user need manfully update the Clair database.
|
||||
@ -18,7 +18,6 @@ B. Check the Clair already update the vulnerability to the latest.
|
||||
c. If you are using harbor you can find the latest Clair log under /var/log/harbor/2017--xx-xx/clair.log
|
||||
|
||||
d. You will find some logs like follow:
|
||||
|
||||
```
|
||||
Jul 3 20:40:45 172.18.0.1 clair[3516]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-07-04 03:40:45.890364","updater name":"rhel"}
|
||||
Jul 3 20:40:46 172.18.0.1 clair[3516]: {"Event":"finished fetching","Level":"info","Location":"updater.go:227","Time":"2017-07-04 03:40:46.768924","updater name":"alpine"}
|
||||
@ -29,7 +28,6 @@ B. Check the Clair already update the vulnerability to the latest.
|
||||
Jul 4 00:26:18 172.18.0.1 clair[3516]: {"Event":"adding metadata to vulnerabilities","Level":"info","Location":"updater.go:253","Time":"2017-07-04 07:26:18.060810"}
|
||||
Jul 4 00:38:05 172.18.0.1 clair[3516]: {"Event":"update finished","Level":"info","Location":"updater.go:198","Time":"2017-07-04 07:38:05.251580"}
|
||||
```
|
||||
|
||||
e. The update finished indicate that Clair has finished an vulnerability update round. You need to check that logs above it to make sure all the endpoints are update correctly.
|
||||
|
||||
### Data dump
|
||||
@ -56,7 +54,7 @@ A. Before update the offline data, user are strongly suggested to backup their C
|
||||
A. Copy the vulnerability.sql and clear.sql to the clair-db container which you want to update.
|
||||
(if you check the harbor docker compose file you will find clair-db has two volumes: ./common/config/clair/postgresql-init.d/:/docker-entrypoint-initdb.d and /data/clair-db:/var/lib/postgresql/data, you can put the above sql file in ether of this two folder as a transfer)
|
||||
|
||||
B. Get the clair db shell by "docker exec –it clair-db bash"
|
||||
B. Get the Clair db shell by "docker exec –it clair-db bash"
|
||||
|
||||
C. $>psql -U postgres < clear.sql
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user