Skip to content

Commit

Permalink
Have Docker compose invoke commands clean up after themselves (#3621)
Browse files Browse the repository at this point in the history
* Closed #3621: Have Docker compose invoke commands clean up after themselves

* Update changes/3621.changed

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>

---------

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
  • Loading branch information
bryanculver and glennmatthews committed Apr 19, 2023
1 parent 060b2d7 commit 085618e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/3621.changed
@@ -0,0 +1 @@
Changed development Docker compose commands to not leave temporary containers behind.
2 changes: 1 addition & 1 deletion tasks.py
Expand Up @@ -178,7 +178,7 @@ def run_command(context, command, **kwargs):
if "nautobot" in results.stdout:
compose_command = f"exec nautobot {command}"
else:
compose_command = f"run --entrypoint '{command}' nautobot"
compose_command = f"run --rm --entrypoint '{command}' nautobot"

docker_compose(context, compose_command, pty=True)

Expand Down

0 comments on commit 085618e

Please sign in to comment.