kopia lustrzana https://github.com/jupyterhub/repo2docker
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.cipull/1421/head
rodzic
268e18765b
commit
3bdc004e46
|
@ -176,8 +176,9 @@ class DockerEngine(ContainerEngine):
|
||||||
# whatever configuration the user has already set
|
# whatever configuration the user has already set
|
||||||
shutil.copy2(dc_path, new_dc_path)
|
shutil.copy2(dc_path, new_dc_path)
|
||||||
|
|
||||||
os.environ['DOCKER_CONFIG'] = d
|
os.environ["DOCKER_CONFIG"] = d
|
||||||
proc = subprocess.run([
|
proc = subprocess.run(
|
||||||
|
[
|
||||||
"docker",
|
"docker",
|
||||||
"login",
|
"login",
|
||||||
"--username",
|
"--username",
|
||||||
|
@ -186,15 +187,15 @@ class DockerEngine(ContainerEngine):
|
||||||
registry,
|
registry,
|
||||||
],
|
],
|
||||||
input=password.encode(),
|
input=password.encode(),
|
||||||
check=True
|
check=True,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
if old_dc_path:
|
if old_dc_path:
|
||||||
os.environ['DOCKER_CONFIG'] = old_dc_path
|
os.environ["DOCKER_CONFIG"] = old_dc_path
|
||||||
else:
|
else:
|
||||||
del os.environ['DOCKER_CONFIG']
|
del os.environ["DOCKER_CONFIG"]
|
||||||
|
|
||||||
def push(self, image_spec):
|
def push(self, image_spec):
|
||||||
if self.registry_credentials:
|
if self.registry_credentials:
|
||||||
|
|
Ładowanie…
Reference in New Issue