Skip to content

Commit

Permalink
[IMP] Included new command 'docky system' just return a resume of 'do…
Browse files Browse the repository at this point in the history
…cker info' for check errors related to OS or older or newer libraries versions.
  • Loading branch information
mbcosta committed Oct 1, 2024
1 parent 43f768c commit 4c90fe4
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion docky/cmd/run_open.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

0 comments on commit 4c90fe4

Please sign in to comment.