dicer fork
Creates an instance called NAME as a copy of INSTANCE. It is the same as taking a snapshot of INSTANCE and forking it, except that no snapshot is kept. A running or paused instance is paused while its memory is written, and its copy runs. A stopped instance’s copy is stopped, and boots from a copy of its disk.
The copy has an address of its own, on the same network unless --network is
given. It publishes no ports unless -p is given: two instances cannot publish
the same host port.
Without NAME, the copy is named after INSTANCE, with a random suffix, such as web-k3x9.
Usage
$ dicer fork INSTANCE [NAME] [flags]
Examples
$ dicer instance fork web
$ dicer instance fork web web-2
$ dicer instance fork web web-3 -p 8081:80
$ dicer instance fork web web-4 -p 80
Flags
| Flag | Description |
|---|---|
--ip string | Static IP address (default: assigned from the subnet). |
--network string | Network to attach to (default: the source instance’s). |
-p, --publish stringArray | Publish a guest port on the host, as [[hostIP:]hostPort:]guestPort[/tcp|udp]; without a host port, or with 0, the daemon picks a free one (repeatable). |
Global flags
| Flag | Description |
|---|---|
-D, --debug | Trace every call to the daemon on stderr (or set $DICER_DEBUG). |
-r, --remote string | Daemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local). |
--request-timeout duration | Give up on a single call to the daemon after this long, e.g. 30s (0: never; streams such as logs -f and exec are not bounded). |