mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-05 07:27:50 +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:
|
with open(key_file, 'r') as f:
|
||||||
key = f.read()
|
key = f.read()
|
||||||
print("loaded secret from file: %s" % key_file)
|
print("loaded secret from file: %s" % key_file)
|
||||||
|
mark_file(key_file)
|
||||||
return key
|
return key
|
||||||
if not os.path.isdir(folder):
|
if not os.path.isdir(folder):
|
||||||
os.makedirs(folder)
|
os.makedirs(folder)
|
||||||
|
Loading…
Reference in New Issue
Block a user