Get docker run command from container
Project description
docker recreate tools
This is a small tool to print re-create existance docker container run commands.
Install
# through pip
pip install docker-recreate
# using curl
curl https://raw.githubusercontent.com/jeffrey4l/docker-recreate/master/main.py \
-o /usr/local/bin/docker-recreate
chmod +x /usr/local/bin/docker-recreate
# for China
curl https://raw.fastgit.org/jeffrey4l/docker-recreate/master/main.py \
-o /usr/local/bin/docker-recreate
chmod +x /usr/local/bin/docker-recreate
Usage
$ docker-recreate -h
usage: docker-recreate [-h] [--format {csv,json,oneline,string,yaml}] container [container ...]
positional arguments:
container
optional arguments:
-h, --help show this help message and exit
--format {csv,json,oneline,string,yaml}, -f {csv,json,oneline,string,yaml}
$ docker-create grafana
docker \
run \
-d \
--name grafana \
--network host \
--restart always \
-v grafana:/var/lib/grafana:rw \
grafana/grafana:8.0.3
$ docker-recreate ceph_osd_2
docker \
run \
-d \
--name ceph_osd_2 \
--network host \
--restart unless-stopped \
--pid host \
--privileged \
-e OSD_STORETYPE=filestore \
-e OSD_BS_FSUUID=e76f38d0-3f34-4771-b099-d26ee063ae01 \
-e OSD_ID=2 \
-e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS \
-e JOURNAL_PARTITION=/dev/disk/by-partuuid/9967b401-ff2b-4ed4-ac15-028e89238bdf \
-e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=134217728 \
-e KOLLA_SERVICE_NAME=ceph-osd-2 \
-v kolla_logs:/var/log/kolla/:rw \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/kolla/ceph-osd/:/var/lib/kolla/config_files/:ro \
-v /dev/:/dev/:rw \
-v /var/lib/ceph/osd/e76f38d0-3f34-4771-b099-d26ee063ae01:/var/lib/ceph/osd/ceph-2:rw \
172.20.140.229:4000/kolla/centos-source-ceph-osd:train
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docker_recreate-1.4.5.tar.gz
(10.3 kB
view details)
File details
Details for the file docker_recreate-1.4.5.tar.gz
.
File metadata
- Download URL: docker_recreate-1.4.5.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c21931559e75bac19b5e660d2da74f721cc566e88e072f0fd3a1bc66a2240c4e |
|
MD5 | 20c51626101da7db15157bc7bd8e82d2 |
|
BLAKE2b-256 | d6ee082e91334fb246ae4b6ec73ad1ac0e2d62051b5a470fa53e245cdd5b5793 |