On Mon, Jun 08, 2020 at 01:24:47AM +0000, Larry Shen wrote:
Thanks Antonio for the clarify.
A side question: For docker test shell, if possible add more docker options for user? E.g. bind mount, etc.
A scenario is: If we have some code needed when test, currently, we could just inject it into docker image when do docker build, or when test git clone the code from network. You know docker test shell use `--rm`, means every time, we need to git clone it, or if a small changes we need to build the image. A bind mount there to mount our code may make things easier for us?
I'm not sure what is the problem you want to solve here. Including code in a docker image seems to be the recommended way of using docker. If the code changes, then the image changes - that's how it's supposed to work.
Note that the fact that docker runs containers with --rm has no effect on docker images: --rm only removes the _container instance_ after it finishes running, not the image. If your code was already in the image it's not affected. If the code is cloned during the test, it is also not affected by --rm as that same container instance would not be be reused for later tests anyway.