|
@@ -12,22 +12,28 @@ containers using the same arguments you used previously.
|
12
|
12
|
Want to update to a newer image, or add a missing port publication?
|
13
|
13
|
docker-rerun's got you covered.
|
14
|
14
|
|
|
15
|
+## Installation
|
|
16
|
+
|
|
17
|
+You can install the latest version of docker-rerun using pip:
|
|
18
|
+
|
|
19
|
+ $ pip install docker-rerun
|
|
20
|
+
|
15
|
21
|
## Usage
|
16
|
22
|
|
17
|
23
|
In the most basic usage, you pass in a container name and it will be
|
18
|
24
|
stopped, deleted and recreated:
|
19
|
25
|
|
20
|
|
- $ ./docker-rerun apache
|
|
26
|
+ $ docker-rerun apache
|
21
|
27
|
|
22
|
28
|
You can also pass additional arguments to modify aspects of the container
|
23
|
29
|
when it's rerun. For example, to change the image:
|
24
|
30
|
|
25
|
|
- $ ./docker-rerun --image nginx:latest webserver
|
|
31
|
+ $ docker-rerun --image nginx:latest webserver
|
26
|
32
|
|
27
|
33
|
To check what exactly is going to be performed beforehand, use the --dry-run
|
28
|
34
|
option:
|
29
|
35
|
|
30
|
|
- $ ./docker-rerun --dry-run apache
|
|
36
|
+ $ docker-rerun --dry-run apache
|
31
|
37
|
docker stop apache
|
32
|
38
|
docker rm apache
|
33
|
39
|
docker run --name=apache -p=80:80/tcp --restart=always apache:latest
|