https://pantsbuild.org/ logo
b

breezy-apple-27122

03/01/2023, 1:46 PM
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

curved-television-6568

03/01/2023, 1:52 PM
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

breezy-apple-27122

03/01/2023, 1:54 PM
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

enough-analyst-54434

03/01/2023, 2:12 PM
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

breezy-apple-27122

03/01/2023, 2:30 PM
6 Views