-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] Included new command 'docky system' just return a resume of 'do…
…cker info' for check errors related to OS or older or newer libraries versions.
- Loading branch information
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,12 @@ | |
# @author Sébastien BEAU <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
import sys | ||
from plumbum import cli | ||
from .base import Docky, DockySub | ||
from ..common.api import raise_error | ||
from ..common.api import raise_error, logger | ||
|
||
from python_on_whales import docker | ||
|
||
|
||
class DockyExec(DockySub): | ||
|
@@ -79,3 +82,27 @@ class DockyOpen(DockyExec): | |
def _main(self, *optionnal_command_line): | ||
super()._main(*optionnal_command_line) | ||
self._exec("dcpatched", ["exec", "-e", "NOGOSU=True", self.service] + self.cmd) | ||
|
||
@Docky.subcommand("system") | ||
class DockySystem(DockyExec): | ||
""" | ||
Check your System Infos: | ||
OS Type, Kernel, OS, Docker, Docker Compose, and Docky versions. | ||
""" | ||
def _main(self): | ||
# Info | ||
infos = docker.system.info() | ||
# OS Type | ||
logger.info("OS Type " + infos.os_type) | ||
# Kernel Version | ||
logger.info("Kernel Version " + infos.kernel_version) | ||
# Operation System | ||
logger.info("OS " + infos.operating_system) | ||
# Python Version | ||
logger.info("Python Version " + sys.version) | ||
# Docker Version | ||
logger.info("Docker Version " + infos.server_version) | ||
# Docker Compose Version | ||
logger.info(docker.compose.version()) | ||
# Docky Version | ||
logger.info("Docky Version " + Docky.VERSION) |