Chris Smith 03f7fc91c0 Manually configure nose for circle. | 8 years ago | |
---|---|---|
.gitignore | 8 years ago | |
LICENCE.md | 8 years ago | |
README.md | 8 years ago | |
circle.yml | 8 years ago | |
docker-rerun | 8 years ago | |
requirements.txt | 8 years ago | |
test.py | 8 years ago |
docker-rerun
is a small utility script that makes it easy to re-run docker
containers using the same arguments you used previously.
Want to update to a newer image, or add a missing port publication? docker-rerun’s got you covered.
In the most basic usage, you pass in a container name and it will be stopped, deleted and recreated:
$ ./docker-rerun apache
To check what exactly is going to be performed beforehand, use the --dry-run option:
$ ./docker-rerun --dry-run apache
docker stop apache
docker rm apache
docker run --name=apache -p=80:80/tcp --restart=always apache:latest
At present docker-rerun supports a small number of commonly used arguments:
* Commands (trailing arguments)
* Environment variables (-e/--env)
* Names (--name)
* Networks (--net)
* Port publications (-p)
* Restart policies (--restart)
* User switching (-u/--user)
* Volumes (-v/--volume, and --volumes-from)
Many other command line arguments:
* Labels
* Linking and aliases
* Permissions and policies
Additional options to allow mutating the container config when rerunning. For example:
$ ./docker-rerun --image nginx:1.11.1 nginx
Should replace the previously used image with the one specified.