Merging upstream version 0.10.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
5bb53e823c
commit
5145e72015
5 changed files with 21 additions and 15 deletions
|
@ -547,7 +547,9 @@ class ObjectDownloader:
|
|||
if noztp:
|
||||
self._disable_ztp(file_path=file_path)
|
||||
|
||||
def docker_import(self, image_name: str = "arista/ceos") -> None:
|
||||
def docker_import(
|
||||
self, image_name: str = "arista/ceos", is_latest: bool = False
|
||||
) -> None:
|
||||
"""
|
||||
Import docker container to your docker server.
|
||||
|
||||
|
@ -561,6 +563,9 @@ class ObjectDownloader:
|
|||
logger.info(f"Importing image {self.filename} to {docker_image}")
|
||||
console.print(f"🚀 Importing image {self.filename} to {docker_image}")
|
||||
os.system(f"$(which docker) import {self.filename} {docker_image}")
|
||||
if is_latest:
|
||||
console.print(f"🚀 Configuring {docker_image}:{self.version} to be latest")
|
||||
os.system(f"$(which docker) tag {docker_image} {image_name}:latest")
|
||||
for filename in glob.glob(f"{self.filename}*"):
|
||||
try:
|
||||
os.remove(filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue