When you `pants run` a docker image target with `r...
# general
b
When you
pants run
a docker image target with
restartable=True
, the created container doesn't get stopped if some source files changed. a build is triggered and a new container is created and run but the old one keeps running. Is that intended behaviour?
c
that doesn’t sound right, but, pants makes no assumptions about how you want to run your container (even in the face of
restartable
), so you may want to add
-it --rm
to your docker run args
b
I added --rm but it only removes if stopped manually with ctrl-c, not with a restart
I added the --rm in pants.toml:
Copy code
[docker]
run_args = "--rm"
e
Yeah, this is a bug. The restartable concept is Pants engine node level and it appears to have no notion of killing the prior generation node run.
b