Skip to content

DockerRepository

synapseclient.entity.DockerRepository

Bases: Entity

A Docker repository is a lightweight virtual machine image.

NOTE: store()-ing a DockerRepository created in the Python client will always result in it being treated as a reference to an external Docker repository that is not managed by synapse. To upload a docker image that is managed by Synapse please use the official Docker client and read https://help.synapse.org/docs/Synapse-Docker-Registry.2011037752.html for instructions on uploading a Docker Image to Synapse

ATTRIBUTE DESCRIPTION
repositoryName

The name of the Docker Repository. Usually in the format: [host[:port]/]path. If host is not set, it will default to that of DockerHub. port can only be specified if the host is also specified.

parent

The parent project or folder

properties

A map of Synapse properties

annotations

A map of user defined annotations

local_state

Internal use only

Source code in synapseclient/entity.py
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
class DockerRepository(Entity):
    """
    A Docker repository is a lightweight virtual machine image.

    NOTE: [store()][synapseclient.Synapse.store]-ing a DockerRepository created in the Python client will always result
    in it being treated as a reference to an external Docker repository that is not
    managed by synapse. To upload a docker image that is managed by Synapse please use the official
    Docker client and read <https://help.synapse.org/docs/Synapse-Docker-Registry.2011037752.html>
    for instructions on uploading a Docker Image to Synapse

    Attributes:
        repositoryName: The name of the Docker Repository. Usually in the format: [host[:port]/]path.
                        If host is not set, it will default to that of DockerHub.
                        port can only be specified if the host is also specified.
        parent: The parent project or folder
        properties: A map of Synapse properties
        annotations: A map of user defined annotations
        local_state: Internal use only
    """

    _synapse_entity_type = "org.sagebionetworks.repo.model.docker.DockerRepository"

    _property_keys = Entity._property_keys + ["repositoryName"]

    def __init__(
        self,
        repositoryName=None,
        parent=None,
        properties=None,
        annotations=None,
        local_state=None,
        **kwargs,
    ):
        if repositoryName:
            kwargs["repositoryName"] = repositoryName
        super(DockerRepository, self).__init__(
            properties=properties,
            annotations=annotations,
            local_state=local_state,
            parent=parent,
            **kwargs,
        )
        if "repositoryName" not in self:
            raise SynapseMalformedEntityError(
                "DockerRepository must have a repositoryName."
            )