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

Clone

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

Options:

--ipaddr, -i "<IPv4>/<mask> <vlan tag>"    (ver <= 7 ) Set container IP address and VLAN
--network, -n "<IPv4>/<mask> <vlan tag>"   (ver >= 8 ) Set container IP address and VLAN
--env, -e <string id>                      Set environment id for container    
--secret -s <console secret>               Console secret

Examples:

subutai clone debian-stretch container1
subutai clone debian-stretch@subutai:0.4.5 container1
subutai clone -i "192.168.0.200/24 10" ubuntu-xenial z1    #version <= 7
subutai clone -n "192.168.0.200/24 10" ubuntu-xenial z1    #version >= 8
subutai clone id:{template-id} foo
subutai clone foo@tom:1.0.0 foo1 -s {console-secret}

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 (see import for details). 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 (Note -i switch was used for agent version <=7, from version 8 and on -n switch is used).
Option -e writes the environment ID string inside new container. Option -s 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:{template-id} foo

Or a full template reference (name@owner:version) can be used to always specify a concrete version of a template of a concrete owner (if version not specified, latest version is used):

subutai clone foo@tom foo1
subutai clone foo@tom:1.0.0 foo1

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