Hi @hashim-abu-gellban_3562,
DockerImages_GetTags
is part of the Native API, which is basically just a wrapper around the SQL ProGet database. That's fine to use, but you can also use the Docker API to list tags as follows:
curl -X GET https://proget-url/v2/feedName/repositoryName/tags/list
The Docker API will show you tags that come through a connector, where as the Native API is will only be local tags.
The Docker API does not provide a way to directly retrieve the operating system information of Docker images. However, you can infer the operating system information by examining the contents of the Docker image itself or by using external tools and scripts.
Here's an example in Python of how to do that:
import docker
def get_os_of_image(image_name, tag):
client = docker.from_env()
image = client.images.get(f"{image_name}:{tag}")
os_info = image.attrs['Os']
return os_info
# Example usage
os_info = get_os_of_image('my-image', 'latest')
print(f"Operating System: {os_info}")
Alternatively, you can also inspect the image layers directly. Docker image layers contain files from the image's filesystem, and you can look for specific files or patterns that are indicative of the operating system.
Best,
Dean