FEATURE: add start-cmd to provide the command line used to launch container
authorSam Saffron <sam.saffron@gmail.com>
Tue, 19 Mar 2019 07:57:19 +0000 (18:57 +1100)
committerSam Saffron <sam.saffron@gmail.com>
Tue, 19 Mar 2019 07:57:19 +0000 (18:57 +1100)
commit7d49dbe7d4a05223951ceec76230a893ad5c6798
treef22eb8461a805e99f4ef75bd35c68164258166ee
parent9eeb324eceb94c1dfbd76d371d5078a9e5a2f6b3
FEATURE: add start-cmd to provide the command line used to launch container

This feature is only part done, this is a work in progress.

Sometimes it is handy to get the full docker command used to launch
a container, this allows us to cleanly amend it prior to starting.

This works like so:

```
sam@arch discourse_docker % ./launcher start-cmd redis
+ true run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e 'test=I am a test' -h arch-redis -e DOCKER_HOST_IP=172.17.0.1 --name redis -t -p 63799:6379 --expose 33333 -v /home/sam/Source/discourse_docker/shared:/shared --mac-address 02:3e:e9:30:d5:32 local_discourse/redis /sbin/boot
```

Though we really want it to output `docker` instead of `+ true`.

It is tricky in bash cause we handle quoting of `-e` and so on which makes
a straight echo not work as expected.

That said this kludge does give me enough to actually run some tests so
I welcome the progress

Created this so I can run side-by-side tests on various containers
launcher