mirror of
https://github.com/docker/docs.git
synced 2026-11-04 18:26:54 +00:00
<!--Delete sections as needed --> ## Description <!-- Tell us what you did and why --> ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review --------- Signed-off-by: aevesdocker <allie.sadler@docker.com>
152 lines
4.4 KiB
YAML
Generated
152 lines
4.4 KiB
YAML
Generated
command: docker offload create
|
|
short: Create a Docker Offload cloud sandbox
|
|
long: |-
|
|
Create a Docker Offload cloud sandbox.
|
|
|
|
This command is available when **Enable Docker Offload** is turned off in
|
|
Docker Desktop settings, or doesn't appear. If the setting is on, you'll be asked to
|
|
switch it off before continuing.
|
|
|
|
If a sandbox already exists for your account, `create` connects to it instead
|
|
of creating a second one, and resumes it if it's paused.
|
|
|
|
A sandbox pauses once it has been idle for its idle timeout, which is 5m
|
|
unless you set it: nothing working inside it, and no command, build or pull
|
|
in flight. Pausing keeps its containers, and a docker command that needs the
|
|
sandbox, such as `run`, `start` or `attach`, resumes it. Attached sessions
|
|
are cut off by a pause; reattach with `docker attach`. Exec sessions have to
|
|
be started again.
|
|
|
|
Set the idle timeout with `--idle-timeout`, at least 1m, or turn pausing off
|
|
with `--keep-alive`. Either applies at once to a sandbox that's already
|
|
running, and is kept for that sandbox on this machine; a new sandbox starts
|
|
from 5m. A kept-alive sandbox runs until you stop it, but still pauses if
|
|
this machine sleeps past its `--ttl`, and after 24h.
|
|
|
|
`--cpus`, `--memory` and `--ttl` apply only when a sandbox is created. If a
|
|
sandbox is already running, they aren't applied and `create` tells you so.
|
|
To resize, create again with `--recreate`, which deletes the sandbox and
|
|
everything on it.
|
|
usage: docker offload create [OPTIONS]
|
|
pname: docker offload
|
|
plink: docker_offload.yaml
|
|
options:
|
|
- option: account
|
|
shorthand: a
|
|
value_type: string
|
|
default_value: ""
|
|
description: The Docker account to use
|
|
deprecated: false
|
|
hidden: true
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: cpus
|
|
value_type: uint32
|
|
default_value: "0"
|
|
description: 'The number of CPUs for a new sandbox: 1, 2, 4, 8 or 16'
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: idle-timeout
|
|
value_type: duration
|
|
default_value: 0s
|
|
description: |
|
|
How long the sandbox may be idle before it pauses, as a duration like 30m (default 5m, minimum 1m, 0 is --keep-alive)
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: keep-alive
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: Never pause the sandbox for being idle
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: memory
|
|
value_type: string
|
|
default_value: ""
|
|
description: Memory for a new sandbox, as a size like 16g
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: recreate
|
|
value_type: bool
|
|
default_value: "false"
|
|
description: |
|
|
Recreate the sandbox if it is a different size than asked for. Deletes the old sandbox and everything on it.
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: timeout
|
|
value_type: duration
|
|
default_value: 15m0s
|
|
description: How long to wait for the sandbox to be ready
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
- option: ttl
|
|
value_type: duration
|
|
default_value: 0s
|
|
description: |
|
|
How long the sandbox keeps running after the daemon stops renewing it, for example if this machine sleeps or goes offline, as a duration like 4h
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|
|
examples: |-
|
|
### Create a sandbox and connect to it
|
|
|
|
```console
|
|
$ docker offload create
|
|
```
|
|
|
|
### Create a sandbox with a chosen size and lifetime
|
|
|
|
```console
|
|
$ docker offload create --cpus 8 --memory 16g --ttl 4h
|
|
```
|
|
|
|
### Change the idle timeout
|
|
|
|
Applies at once to a sandbox that's already running:
|
|
|
|
```console
|
|
$ docker offload create --idle-timeout 30m
|
|
```
|
|
|
|
### Keep a sandbox awake
|
|
|
|
The sandbox runs, and bills, until you stop it:
|
|
|
|
```console
|
|
$ docker offload create --keep-alive
|
|
```
|
|
deprecated: false
|
|
hidden: false
|
|
experimental: false
|
|
experimentalcli: false
|
|
kubernetes: false
|
|
swarm: false
|