Skip to content
Dilshat edited this page Mar 20, 2018 · 18 revisions

Clone

clone [options] <template> <container> - clone Subutai container

Options:

--ipaddr, -i "<IPv4>/<mask> <vlan tag>"	            set container IP address and VLAN
--env, -e <string id>	                            set environment id for container    
--token, -t <string token>	                            token to verify with MH  
-k <cdn token>                                          CDN token to clone private/shared templates

Examples:

subutai clone master container1
subutai clone -i "192.168.0.200/24 10" zabbix z1
subutai clone id:73e95ab2-b9f8-4ca9-bbf4-34e22fc6ebfc foo
subutai clone foo@tom:1.0.0

Description:

The clone command creates new <container> from a Subutai <template>. If the specified template argument is not deployed in system, Subutai first tries to import it, and if import succeeds, it then continues to clone from the imported template image. By default, clone will use the NAT-ed network interface with IP address received from the Subutai DHCP server, but this behavior can be changed with command options described below.

If -i option is defined, separate bridge interface will be created in specified VLAN and new container will receive static IP address.
Option -e writes the environment ID string inside new container. Option -t is intended to check the origin of new container creation request during environment build. This is one of the security checks which makes sure that each container creation request is authorized by registered user.

The clone options are not intended for manual use: unless you're confident about what you're doing. Use default clone format without additional options to create Subutai containers.

A concrete template can be referenced while cloning by specifying its ID

subutai clone id:73e95ab2-b9f8-4ca9-bbf4-34e22fc6ebfc foo

Or a full template reference can be used to always specify a concrete version of a template of a concrete owner,

subutai clone foo@tom:1.0.0 (name@owner:version)

Using the full template reference is preferable since template ID might change