Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@ def read_version():
'docker~=7.0',
'pyyaml~=6.0',
'sc @ git+https://github.com/rdkcentral/sc.git@main'
]
],
entry_points={
'sc.plugins': [
'sc_docker = sc_docker.plugin:DockerPlugin'
]
}
)
4 changes: 3 additions & 1 deletion src/sc_docker/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .cli import cli
from .docker_plugin import DockerPlugin

plugin = DockerPlugin()
5 changes: 1 addition & 4 deletions src/sc_docker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import click

from .core import SCDocker

@click.group()
def cli():
# Putting functionality in here will do nothing as sc entrypoint now
Expand Down Expand Up @@ -86,6 +86,3 @@ def _validate_docker():
click.secho(f"ERROR: Docker failed: {e}", fg="red")
click.secho(f"You likely don't have access to the docker daemon!", fg="red")
sys.exit(1)

if __name__ == "__main__":
cli()
11 changes: 11 additions & 0 deletions src/sc_docker/docker_plugin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from .cli import cli
from sc.plugin import Plugin

class DockerPlugin(Plugin):
def get_cli(self):
return cli

# This is an example sc-docker doesn't use logging in its current state.
@property
def loggers_to_register(self):
return ['docker']