Skip to content

Commit

Permalink
Improve docker scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nolan1999 committed Dec 15, 2024
1 parent c5d520f commit e7f2f43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
docker-build = "scripts.docker:build"
docker-serve = "scripts.docker:serve"
docker-stop = "scripts.docker:stop"
docker-cleanup = "scripts.docker:cleanup"
serve = "scripts.serve:main"

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def stop() -> None:
"""
client = _get_client()
for container in client.containers.list(ignore_removed=True):
if container.attrs["image"].startswith(_get_package_name() + ":"):
if container.attrs["Config"]["Image"].startswith(_get_package_name() + ":"):
container.remove(force=True)


Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POETRY_VERSION=$(grep -Po '(?<=^requires = \["poetry-core=)[^"]*' pyproject.toml)
pip install "poetry==$POETRY_VERSION"
poetry install --no-root --no-dev --no-interaction --no-ansi
poetry install --no-dev --no-interaction --no-ansi

0 comments on commit e7f2f43

Please sign in to comment.