Felix Horvat
08/11/2022, 1:03 PMAnna Geller
08/11/2022, 2:46 PMFelix Horvat
08/11/2022, 3:44 PM--infra-block
Or would i pass that to the agent?
To me it seems that the auth part should just be part of the docker container block - similar to how it is with s3Anna Geller
08/11/2022, 4:07 PMben
08/23/2022, 6:43 PMdocker.errors.APIError: 400 Client Error for <http+docker://localnpipe/v1.41/images/create?tag=5050%2Frepo%2Fpath%2Fshared-image&fromImage=gitlab.server.com>: Bad Request ("invalid tag format")
prefect/infrastructure/docker.py
When I do a proof of concept change (i.e., not production worthy) DockerContainer._get_image_and_tag()
and add the noted lines, my GitLab image containing a port number (referenced above) runs successfully:
def _get_image_and_tag(self) -> Tuple[str, Optional[str]]:
parts = self.image.split(":")
if len(parts) > 2: # <= added
parts = [f"{parts[0]}:{parts[1]}", parts[2]] # <= added
image = parts.pop(0)
tag = parts[0] if parts else None
return image, tag
With the above adjustment, if I use a generic DockerContainer block together with a generic DockerRegistry block, both connected to a GitLab container registry, both seem to work fine (authenticates successfully, pulls the image, and runs it).Anna Geller
08/25/2022, 1:46 PMben
08/25/2022, 1:53 PMparse_tag_image()
function based on the bounds of possibilities that Docker Image Specification v1.1.0 lists.Anna Geller
08/25/2022, 2:11 PMben
08/25/2022, 2:12 PM