public function commit(string $container,
                           string $repo,
                           string $tag,
                           string $comment,
                           string $author,
                           bool $pause,
                           string $changes,
                           array $request_body)
    {
        $data = [
            'container' => $container,
            'repo' => $repo,
            'tag' => $tag,
            'comment' => $comment,
            'author' => $author,
            'pause' => $pause,
            'changes' => $changes,
        ];

        $url = self::$docker_host.'/commit?'.http_build_query($data);

        $request = json_encode($request_body);

        return self::$curl->post($url, $request, self::$header);
    }
public function commit(string $container,
                           string $repo,
                           string $tag,
                           string $comment,
                           string $author,
                           bool $pause,
                           string $changes,
                           array $request_body)
    {
        $data = [
            'container' => $container,
            'repo' => $repo,
            'tag' => $tag,
            'comment' => $comment,
            'author' => $author,
            'pause' => $pause,
            'changes' => $changes,
        ];

        $url = self::$docker_host.'/commit?'.http_build_query($data);

        $request = json_encode($request_body);

        return self::$curl->post($url, $request, self::$header);
    }
public function commit ( string $ container , string $ repo , string $ tag , string $ comment , string $ author , bool $ pause , string $ changes , array $ request_body ) { $ data = [ 'container' => $ container , 'repo' => $ repo , 'tag' => $ tag , 'comment' => $ comment , 'author' => $ author , 'pause' => $ pause , 'changes' => $ changes , ] ; $ url = self :: $ docker_host . '/commit?' . http_build_query ( $ data ) ; $ request = json_encode ( $ request_body ) ; return self :: $ curl -> post ( $ url , $ request , self :: $ header ) ; }
Create a new image from a container.

@param string $container
@param string $repo
@param string $tag
@param string $comment
@param string $author
@param bool   $pause
@param string $changes
@param array  $request_body

@return mixed 201

@throws Exception

@see https://docs.docker.com/engine/api/v1.37/#operation/ImageCommit
Create a new image from a container .