Skip to content

Commit

Permalink
Clean up after repository migration
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Aug 14, 2023
1 parent ef68516 commit 1e8e721
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 116 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The general usage of this mode is to run
```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
ghcr.io/simonrw/localstack-docker-debug:main \
ghcr.io/localstack/localstack-docker-debug:main \
diagnose \
--source-container "Application Container" \
--target-container "LocalStack"
Expand All @@ -44,7 +44,7 @@ This mode scans your docker network for network specific information about the c
```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
ghcr.io/simonrw/localstack-docker-debug:main \
ghcr.io/localstack/localstack-docker-debug:main \
probe > topology.json
```

Expand Down
93 changes: 0 additions & 93 deletions dockerdebug/connectivity.py

This file was deleted.

1 change: 1 addition & 0 deletions dockerdebug/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEBUG_IMAGE_NAME = "ghcr.io/localstack/localstack-docker-debug:main"
14 changes: 4 additions & 10 deletions dockerdebug/diagnose.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@
import logging
import socket
import uuid
from typing import Callable, ContextManager, Generator, Protocol, Type, Self, Any, cast, Iterable
from typing import Callable, Type, Self, Any, cast, Iterable

from docker import DockerClient
from docker.errors import ContainerError, NotFound
from docker.models.containers import Container
from docker.models.networks import Network

from dockerdebug.connectivity import (
CannotConnectReason,
can_connect_to_localstack_health_endpoint,
can_connect_to_localstack_health_endpoint_from_container,
)
from dockerdebug.constants import DEBUG_IMAGE_NAME

LOG = logging.getLogger(__name__)
# LOG.setLevel(logging.DEBUG)


class Protocol(Enum):
Expand Down Expand Up @@ -164,7 +159,7 @@ def perform_connectivity_test(self):
def test_dns(self, test_container_network_name: str | None = None) -> bool:
try:
self.client.containers.run(
image="simonrw/debug:latest",
image=DEBUG_IMAGE_NAME,
entrypoint="python",
command=[
"-c",
Expand Down Expand Up @@ -261,7 +256,6 @@ def perform_connectivity_test(self, test_network_name: str | None = None):
# recurse back into the test
return self.perform_connectivity_test(test_network_name)


print("No further suggestions to make")

def test_health_endpoint(
Expand All @@ -276,7 +270,7 @@ def test_health_endpoint(

try:
self.client.containers.run(
image="simonrw/debug:latest",
image="DEBUG_IMAGE_NAME",
entrypoint="bash",
command=["-c", f"curl {health_endpoint}"],
network=test_network_name,
Expand Down
11 changes: 0 additions & 11 deletions run.sh

This file was deleted.

0 comments on commit 1e8e721

Please sign in to comment.