Skip to content

dicer instance 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 instance fork INSTANCE [NAME] [flags]

Examples

$ dicer instance fork web
$ dicer instance fork web web-2
$ dicer instance fork web web-3 -p 8081:80

Flags

FlagDescription
--ip stringStatic IP address (default: assigned from the subnet).
--network stringNetwork to attach to (default: the source instance’s).
-p, --publish stringArrayPublish a guest port on the host, as [hostIP:]hostPort:guestPort[/tcp|udp] (repeatable).

Global flags

FlagDescription
-D, --debugTrace every call to the daemon on stderr (or set $DICER_DEBUG).
-r, --remote stringDaemon 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 durationGive 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).