Skip to content

Commit

Permalink
Release Surena version 0.1.2 and Update logs of removing Docker image…
Browse files Browse the repository at this point in the history
… and Container. (#3)

* Update logs of while surena can not remove Docker image or container.

* Change changelog file. and release new version
  • Loading branch information
norouzzadegan authored May 23, 2024
1 parent c532d14 commit 5a5fe37
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.2] - 2024-05-23
### Fixed
- Updated logs for when Surena cannot remove a Docker image or container.

## [0.1.1] - 2024-05-23
### Added
- Support the 'get-docker-host' command to gain access to the Docker host using two methods: Tor network and reverse SSH.
- Support the 'is-docker-host' command to determine if a Docker service is accessible from the TCP network.
- Added support for the 'get-docker-host' command to gain access to the Docker host using two methods: Tor network and reverse SSH.
- Added support for the 'is-docker-host' command to determine if a Docker service is accessible from the TCP network.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "surena"
version = "0.1.1"
version = "0.1.2"
description = ""
authors = ["Mohammad Norouzzadegan <[email protected]>"]
readme = "README.md"
Expand Down
12 changes: 10 additions & 2 deletions src/surena/cli/commands/get_docker_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,18 @@ def get_docker_host(
docker_host.remove_container(spy_container.container.id)
logger.info(f'Surena removed container "{spy_container.container.id}" from Docker Host.')
except ValueError:
logger.error(f'Surena cannot remove container "{spy_container.container.id}" from Docker Host.')
logger.error(
f'Surena cannot remove Container "{spy_container.container.id}" from Docker Host.'
"You can remove the container by executing the command below on your local machine:\n"
f"docker -H tcp://{docker_host_address}:{docker_host_port} rm -f {spy_container.container.id}"
)

try:
docker_host.remove_image(image)
logger.info(f'Surena removed Image "{image_name}" from Docker Host.')
except ValueError:
logger.error(f'Surena could not remove Image "{image_name}" from Docker Host.')
logger.error(
f'Surena could not remove Image "{image_name}" from Docker Host.\n'
"You can remove the image by executing the command below on your local machine:\n"
f"docker -H tcp://{docker_host_address}:{docker_host_port} rmi -f {image_name}"
)

0 comments on commit 5a5fe37

Please sign in to comment.