kopia lustrzana https://github.com/jupyterhub/repo2docker
Move login command inside try so we clear env correctly
rodzic
d3facba5fb
commit
342eea96a8
|
@ -190,19 +190,19 @@ class DockerEngine(ContainerEngine):
|
|||
shutil.copy2(dc_path, new_dc_path)
|
||||
|
||||
os.environ["DOCKER_CONFIG"] = d
|
||||
proc = subprocess.run(
|
||||
[
|
||||
"docker",
|
||||
"login",
|
||||
"--username",
|
||||
username,
|
||||
"--password-stdin",
|
||||
registry,
|
||||
],
|
||||
input=password.encode(),
|
||||
check=True,
|
||||
)
|
||||
try:
|
||||
subprocess.run(
|
||||
[
|
||||
"docker",
|
||||
"login",
|
||||
"--username",
|
||||
username,
|
||||
"--password-stdin",
|
||||
registry,
|
||||
],
|
||||
input=password.encode(),
|
||||
check=True,
|
||||
)
|
||||
yield
|
||||
finally:
|
||||
if old_dc_path:
|
||||
|
|
Ładowanie…
Reference in New Issue