mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-21 21:30:48 +02:00
Added link to rename
This commit is contained in:
parent
ddbcca352a
commit
6fa24c08e7
1 changed files with 1 additions and 2 deletions
|
@ -88,12 +88,11 @@ If you are a complete Docker newbie, you should probably follow the [series of t
|
||||||
### Lifecycle
|
### Lifecycle
|
||||||
|
|
||||||
* [`docker create`](https://docs.docker.com/reference/commandline/create) creates a container but does not start it.
|
* [`docker create`](https://docs.docker.com/reference/commandline/create) creates a container but does not start it.
|
||||||
|
* [`docker rename`](https://docs.docker.com/engine/reference/commandline/rename/) allows the container to be renamed.
|
||||||
* [`docker run`](https://docs.docker.com/reference/commandline/run) creates and starts a container in one operation.
|
* [`docker run`](https://docs.docker.com/reference/commandline/run) creates and starts a container in one operation.
|
||||||
* [`docker rm`](https://docs.docker.com/reference/commandline/rm) deletes a container.
|
* [`docker rm`](https://docs.docker.com/reference/commandline/rm) deletes a container.
|
||||||
* [`docker update`](https://docs.docker.com/engine/reference/commandline/update/) updates a container's resource limits.
|
* [`docker update`](https://docs.docker.com/engine/reference/commandline/update/) updates a container's resource limits.
|
||||||
|
|
||||||
If you want to rename a container, use `docker rename $OLDNAME $NEWNAME`
|
|
||||||
|
|
||||||
If you want a transient container, `docker run --rm` will remove the container after it stops.
|
If you want a transient container, `docker run --rm` will remove the container after it stops.
|
||||||
|
|
||||||
If you want to map a directory on the host to a docker container, `docker run -v $HOSTDIR:$DOCKERDIR`. Also see [Volumes](https://github.com/wsargent/docker-cheat-sheet/#volumes).
|
If you want to map a directory on the host to a docker container, `docker run -v $HOSTDIR:$DOCKERDIR`. Also see [Volumes](https://github.com/wsargent/docker-cheat-sheet/#volumes).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue