Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions docs/reference/commandline/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ To start a container, specify the container ID or image name. For example:
$ docker start my_container
```

### Start a container and attach to its STDOUT/STDERR
### <a name="attach"></a> Start a container and attach to its STDOUT/STDERR (--attach, -a)

> This option is experimental.
>
> This command is experimental on the Docker daemon. It should not be used in
> production environments.
> To enable experimental features on the Docker daemon, edit the
> [daemon.json](/engine/reference/commandline/dockerd/
#daemon-configuration-file)

Comment thread
craig-osterhout marked this conversation as resolved.
Outdated
To start a container and attach to its STDOUT/STDERR and forward signals, use the `--attach` or `-a` option. For example, if you create an nginx container named my_nginx_container, you can start it and monitor its logs using the following:
Comment thread
craig-osterhout marked this conversation as resolved.
Outdated

Expand All @@ -45,7 +53,12 @@ $ docker start -a my_nginx_container
...
```

### Start a contianer and restore from a checkpoint
### <a name="checkpoint"></a> Start a container and restore from a checkpoint (--checkpoint) (experimental)

The `--checkpoint` option is an experimental feature, and should not be
considered stable. To read about experimental daemon options and how to enable
them, see
[Daemon configuration file](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file).
Comment on lines +53 to +56
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. I thought we had a /go/ redirect for this one, but looks like that's only for experimental CLI features (but those are now enabled by default). https://github.com/docker/docs/blob/8d81583dcf89cf302420ca5f5c8a39b22a7e73fb/_redirects.yml#L106-L107

Perhaps we should repurpose that redirect for both cli (no longer needed) and engine features (and have a canonical section about enabling experimental features, etc).

@dvdksn perhaps you have ideas on that?


To start a container and restore it from a checkpoint, use the `--checkpoint` option. For example:

Expand All @@ -60,7 +73,12 @@ checkpoint1
$ docker start --checkpoint checkpoint1 cr
```

### Start a container and restore from a custom checkpoint storage
### <a name="checkpoint-dir"></a> Start a container and restore from a custom checkpoint storage (--checkpoint-dir) (experimental)

The `--checkpoint-dir` option is an experimental feature, and should not be
considered stable. To read about experimental daemon options and how to enable
them, see
[Daemon configuration file](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file).

To start a container and restore it from a checkpoint in a custom checkpoint storage directory, use the `--checkpoint-dir` option. For example:
Comment thread
craig-osterhout marked this conversation as resolved.
Outdated

Expand All @@ -75,15 +93,15 @@ checkpoint2
$ docker start --checkpoint-dir /path/to/checkpoints --checkpoint checkpoint2 cr
```

### Start a container and override the detach key sequence
### <a name="detach-keys"></a> Start a container and override the detach key sequence (--detach-keys)

To start a container and override the key sequence for detaching a container, use the `--detach-keys` option. For example to change the detach sequence to `ctrl` plus `x`, use the following:

```console
$ docker start -a --detach-keys="ctrl-x" my_container
```
Comment thread
craig-osterhout marked this conversation as resolved.

### Start a container and attach to its STDIN
### <a name="interactive"></a> Start a container and attach to its STDIN (--interactive, -i)

To start a container and attach to its STDIN, use the `--interactive` or `-i` option. For example, if you create an ubuntu container named my_ubuntu_container, you can start it and interact with its shell using the following:

Expand Down