mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-03 14:37:44 +01:00
Change owner of the secret file in prepare script
The secretkey file will be loaded by adminserver which is run by non-root user (uid:10000) previously the entrypoint script will run `chown` to a lot files, and there's a breakage in upgrade when we skip running `chown` inside container. This commit will fix the issue during upgrade by changing the owner of the secretkey file.
This commit is contained in:
parent
7254b438ca
commit
ccbd23d14e
@ -144,6 +144,7 @@ def _get_secret(folder, filename, length=16):
|
||||
with open(key_file, 'r') as f:
|
||||
key = f.read()
|
||||
print("loaded secret from file: %s" % key_file)
|
||||
mark_file(key_file)
|
||||
return key
|
||||
if not os.path.isdir(folder):
|
||||
os.makedirs(folder)
|
||||
|
Loading…
Reference in New Issue
Block a user