@@ -125,6 +125,30 @@ public function containerTop($container)
125125 return $ this ->browser ->get ($ this ->url ('/containers/%s/top ' , $ container ))->then (array ($ this ->parser , 'expectJson ' ));
126126 }
127127
128+ /**
129+ * Inspect changes on container id's filesystem
130+ *
131+ * @param string $container container ID
132+ * @return Promise Promise<array>
133+ * @link https://docs.docker.com/reference/api/docker_remote_api_v1.15/#inspect-changes-on-a-containers-filesystem
134+ */
135+ public function containerChanges ($ container )
136+ {
137+ return $ this ->browser ->get ($ this ->url ('/containers/%s/changes ' , $ container ))->then (array ($ this ->parser , 'expectJson ' ));
138+ }
139+
140+ /**
141+ * Export the contents of container id
142+ *
143+ * @param string $container container ID
144+ * @return Promise Promise<string> tar stream
145+ * @link https://docs.docker.com/reference/api/docker_remote_api_v1.15/#export-a-container
146+ */
147+ public function containerExport ($ container )
148+ {
149+ return $ this ->browser ->get ($ this ->url ('/containers/%s/export ' , $ container ))->then (array ($ this ->parser , 'expectPlain ' ));
150+ }
151+
128152 /**
129153 * Resize the TTY of container id
130154 *
@@ -241,6 +265,18 @@ public function containerRemove($container, $v = false, $force = false)
241265 return $ this ->browser ->delete ($ this ->url ('/containers/%s?v=%u&force=%u ' , $ container , $ v , $ force ))->then (array ($ this ->parser , 'expectEmpty ' ));
242266 }
243267
268+ /**
269+ * Copy files or folders of container id
270+ *
271+ * @param string $container container ID
272+ * @param array $config resources to copy `array('Resource' => 'file.txt')` (see link)
273+ * @return Promise Promise<string> tar stream
274+ */
275+ public function containerCopy ($ container , $ config )
276+ {
277+ return $ this ->postJson ($ this ->url ('/containers/%s/copy ' , $ container ), $ config )->then (array ($ this ->parser , 'expectPlain ' ));
278+ }
279+
244280 /**
245281 * Sets up an exec instance in a running container id
246282 *
0 commit comments