Make test containers faster
Closed this issue · 2 comments
The test container is removed every time it's run. This was simpler to implement, but it means that bundler
will take 20-30s to install dependencies every run.
Since the working copy of ops
is just linked into the container, the same container could just be started with docker start
instead of being created with docker run
most of the time. We should only need to create a new container when the underlying image changes.
An optimization to call docker start
if the container already exists would be nice. Also, remove the container at the end of build.sh
, so that when we rebuild the image, the container needs to be recreated.
One trick with this is that the command
can only be set with docker run
, not with docker start
. So we would need two containers: one for test
and one for test-e2e
. If more commands were added we'd need more containers.
This isn't ideal, but wouldn't take much disk space. It's probably worth the speed gain.
Fixed.