@@ -66,6 +66,8 @@ pub enum Transport {
6666 ContainerStorage ,
6767 /// Local directory (`dir:`)
6868 Dir ,
69+ /// Local Docker daemon (`docker-daemon:`)
70+ DockerDaemon ,
6971}
7072
7173/// Combination of a remote image reference and transport.
@@ -114,6 +116,7 @@ impl TryFrom<&str> for Transport {
114116 Self :: DOCKER_ARCHIVE_STR => Self :: DockerArchive ,
115117 Self :: CONTAINERS_STORAGE_STR => Self :: ContainerStorage ,
116118 Self :: LOCAL_DIRECTORY_STR => Self :: Dir ,
119+ Self :: DOCKER_DAEMON_STR => Self :: DockerDaemon ,
117120 o => return Err ( anyhow ! ( "Unknown transport '{}'" , o) ) ,
118121 } )
119122 }
@@ -126,6 +129,7 @@ impl Transport {
126129 const CONTAINERS_STORAGE_STR : & ' static str = "containers-storage" ;
127130 const LOCAL_DIRECTORY_STR : & ' static str = "dir" ;
128131 const REGISTRY_STR : & ' static str = "registry" ;
132+ const DOCKER_DAEMON_STR : & ' static str = "docker-daemon" ;
129133
130134 /// Retrieve an identifier that can then be re-parsed from [`Transport::try_from::<&str>`].
131135 pub fn serializable_name ( & self ) -> & ' static str {
@@ -136,6 +140,7 @@ impl Transport {
136140 Transport :: DockerArchive => Self :: DOCKER_ARCHIVE_STR ,
137141 Transport :: ContainerStorage => Self :: CONTAINERS_STORAGE_STR ,
138142 Transport :: Dir => Self :: LOCAL_DIRECTORY_STR ,
143+ Transport :: DockerDaemon => Self :: DOCKER_DAEMON_STR ,
139144 }
140145 }
141146}
@@ -258,6 +263,7 @@ impl std::fmt::Display for Transport {
258263 Self :: OciDir => "oci:" ,
259264 Self :: ContainerStorage => "containers-storage:" ,
260265 Self :: Dir => "dir:" ,
266+ Self :: DockerDaemon => "docker-daemon:" ,
261267 } ;
262268 f. write_str ( s)
263269 }
0 commit comments