From 568d1a3ad974e493aabe80114a2a9f5223f4aad8 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Feb 04 2021 08:26:20 +0000 Subject: Added docstrings to all Python modules Signed-off-by: Akashdeep Dhar --- diff --git a/base/back.py b/base/back.py index 88e0e98..8d6956a 100644 --- a/base/back.py +++ b/base/back.py @@ -31,6 +31,9 @@ class ProcessHandler: self.prociden = prociden def return_process_info(self): + """ + Returns process information + """ procstmp = psutil.Process(self.prociden).as_dict() retndata = { "pid": procstmp["pid"], @@ -76,12 +79,18 @@ class ProcessHandler: return retndata def get_single_process(self): + """ + Returns information about a single process + """ try: return psutil.Process(int(self.prociden)) except Exception as e: return str(e) def process_killer(self): + """ + Kills process with the requested process ID + """ singproc = self.get_single_process() try: if type(singproc) == psutil.Process: @@ -91,6 +100,9 @@ class ProcessHandler: return {"retnmesg": False} def process_terminator(self): + """ + Terminates process with the requested process ID + """ singproc = self.get_single_process() try: if type(singproc) == psutil.Process: @@ -100,6 +112,9 @@ class ProcessHandler: return {"retnmesg": False} def process_suspender(self): + """ + Suspends process with the requested process ID + """ singproc = self.get_single_process() try: if type(singproc) == psutil.Process: @@ -109,6 +124,9 @@ class ProcessHandler: return {"retnmesg": False} def process_resumer(self): + """ + Resumes process with the requested process ID + """ singproc = self.get_single_process() try: if type(singproc) == psutil.Process: @@ -120,6 +138,9 @@ class ProcessHandler: class LiveUpdatingElements: def get_virtual_memory_data(self): + """ + Returns physical memory data + """ bruhdata = psutil.virtual_memory() retndata = { "total": bruhdata.total, @@ -136,6 +157,9 @@ class LiveUpdatingElements: return retndata def get_swap_memory_info(self): + """ + Returns virtual memory data + """ swapinfo = psutil.swap_memory() retndata = { "total": swapinfo.total, @@ -148,6 +172,9 @@ class LiveUpdatingElements: return retndata def get_cpu_state_times(self): + """ + Returns CPU state time information + """ timedata = psutil.cpu_times(percpu=True) retndata = {} for indx in range(len(timedata)): @@ -167,6 +194,9 @@ class LiveUpdatingElements: return retndata def get_cpu_usage_percent(self): + """ + Returns CPU usage percentage per-core + """ cpuprcnt = psutil.cpu_percent(percpu=True) retndata = {} for indx in range(len(cpuprcnt)): @@ -174,6 +204,9 @@ class LiveUpdatingElements: return retndata def get_cpu_statistics(self): + """ + Returns CPU statistical information + """ cpustats = psutil.cpu_stats() retndata = { "ctx_switches": cpustats.ctx_switches, @@ -184,6 +217,9 @@ class LiveUpdatingElements: return retndata def get_cpu_clock_speed(self): + """ + Returns CPU clock speed information per-core + """ cpuclock = psutil.cpu_freq(percpu=True) retndata = {} for indx in range(len(cpuclock)): @@ -196,6 +232,9 @@ class LiveUpdatingElements: return retndata def get_disk_io_usage(self): + """ + Returns disk IO usage + """ diousage = psutil.disk_io_counters(perdisk=True) retndata = {} for indx in diousage.keys(): @@ -214,6 +253,9 @@ class LiveUpdatingElements: return retndata def get_network_io_usage(self): + """ + Returns network IO usage + """ netusage = psutil.net_io_counters(pernic=True) retndata = {} for indx in netusage.keys(): @@ -231,6 +273,9 @@ class LiveUpdatingElements: return retndata def get_process_listing_info(self): + """ + Returns process listing information + """ procstmp = psutil.process_iter(["pid", "name", "username", "memory_percent", "cpu_percent"]) retndata = {} for indx in procstmp: @@ -245,6 +290,9 @@ class LiveUpdatingElements: return retndata def get_sensors_temperature(self): + """ + Returns thermal statistics + """ senstemp = psutil.sensors_temperatures(fahrenheit=False) retndata = {} for indx in senstemp.keys(): @@ -260,6 +308,9 @@ class LiveUpdatingElements: return retndata def get_sensors_fan_speed(self): + """ + Returns fan speed information + """ senstemp = psutil.sensors_fans() retndata = {} for indx in senstemp.keys(): @@ -273,6 +324,9 @@ class LiveUpdatingElements: return retndata def get_sensors_battery_status(self): + """ + Returns battery statistics + """ retndata = {} try: battstat = psutil.sensors_battery() @@ -290,6 +344,9 @@ class LiveUpdatingElements: return retndata def return_live_data(self): + """ + Returns combined information as a dictionary + """ jsonobjc = { "virtdata": self.get_virtual_memory_data(), "swapinfo": self.get_swap_memory_info(), @@ -311,6 +368,9 @@ class LiveUpdatingElements: class DeadUpdatingElements(LiveUpdatingElements): def get_os_uname_data(self): + """ + Returns static OS information + """ unamdata = os.uname() retndata = { "System name": unamdata.sysname + " " + unamdata.release, @@ -321,10 +381,16 @@ class DeadUpdatingElements(LiveUpdatingElements): return retndata def get_cpu_logical_count(self): + """ + Returns CPU core count + """ cpuquant = psutil.cpu_count(logical=True) return str(cpuquant) def get_all_disk_partitions(self): + """ + Returns disk partitions information + """ diskpart = psutil.disk_partitions(all=True) retndata = [] for indx in diskpart: @@ -338,6 +404,9 @@ class DeadUpdatingElements(LiveUpdatingElements): return retndata def get_network_statistics(self): + """ + Returns network statistics + """ netstats = psutil.net_if_stats() retndata = {} for indx in netstats.keys(): @@ -351,6 +420,9 @@ class DeadUpdatingElements(LiveUpdatingElements): return retndata def get_network_if_addresses(self): + """ + Returns network addresses + """ netaddrs = psutil.net_if_addrs() retndata = {} for indx in netaddrs.keys(): @@ -366,10 +438,16 @@ class DeadUpdatingElements(LiveUpdatingElements): return retndata def get_boot_time(self): + """ + Returns boot time information + """ boottime = time.ctime(psutil.boot_time()) return boottime def return_dead_data(self): + """ + Returns combined information as a dictionary + """ jsonobjc = { "osnmdata": self.get_os_uname_data(), "cpuquant": self.get_cpu_logical_count(), diff --git a/base/frnt.py b/base/frnt.py index cfdf0d0..332b836 100644 --- a/base/frnt.py +++ b/base/frnt.py @@ -30,6 +30,10 @@ class StatisticalEndpoint(object): self.passcode = passcode def on_get(self, rqst, resp): + """ + Endpoint for fetching host station information + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") if passcode == self.passcode: @@ -51,6 +55,10 @@ class ProcessHandlingEndpoint(object): self.passcode = passcode def on_get(self, rqst, resp): + """ + Endpoint for fetching information about a specific process + Method: GET + """ passcode = rqst.get_param("passcode") if passcode == self.passcode: retnjson = ProcessHandler(int(rqst.get_param("prociden"))).return_process_info() @@ -66,6 +74,10 @@ class ProcessControllingEndpoint(object): self.passcode = passcode def on_get(self, rqst, resp): + """ + Endpoint for controlling specific processes + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") prociden = int(rqst.get_param("prociden")) diff --git a/dish/back.py b/dish/back.py index fe48df1..ef1efc0 100644 --- a/dish/back.py +++ b/dish/back.py @@ -27,9 +27,15 @@ class DockerPreliminaryInformation: self.clinobjc = DockerClient(base_url=unixsock) def get_docker_info(self): + """ + Returns container station information + """ return self.clinobjc.info() def get_docker_version(self): + """ + Returns container station versioning + """ return self.clinobjc.version() @@ -38,6 +44,9 @@ class DockerContainerInformation: self.clinobjc = DockerClient(base_url=unixsock) def get_container_list(self): + """ + Returns list of containers + """ contlist = self.clinobjc.containers.list(all=True) dispdict = {} for indx in contlist: @@ -48,6 +57,9 @@ class DockerContainerInformation: return dispdict def get_per_container_static_information(self, contiden): + """ + Returns preliminary information of a selected container + """ try: contobjc = self.clinobjc.containers.get(contiden) dispdict = { @@ -70,6 +82,9 @@ class DockerContainerInformation: return dispdict def get_per_container_logs_data(self, contiden): + """ + Returns logging information of a selected container + """ try: contobjc = self.clinobjc.containers.get(contiden) dispdict = { @@ -82,6 +97,9 @@ class DockerContainerInformation: return dispdict def get_per_container_top_data(self, contiden): + """ + Returns list of processes running in a selected container + """ try: contobjc = self.clinobjc.containers.get(contiden) dispdict = { @@ -94,6 +112,9 @@ class DockerContainerInformation: return dispdict def get_per_container_statistics(self, contiden): + """ + Returns hardware statistics of a selected container + """ try: contobjc = self.clinobjc.containers.get(contiden) dispdict = { @@ -111,6 +132,9 @@ class DockerImageInformation: self.clinobjc = DockerClient(base_url=unixsock) def get_image_list(self): + """ + Returns list of images + """ imejlist = self.clinobjc.images.list(all=True) dispdict = {} for indx in imejlist: @@ -121,6 +145,9 @@ class DockerImageInformation: return dispdict def get_per_image_static_information(self, imejiden): + """ + Returns preliminary information of a selected image + """ try: imejobjc = self.clinobjc.images.get(imejiden) dispdict = { @@ -138,6 +165,9 @@ class DockerImageInformation: return dispdict def get_per_image_revision_history(self, imejiden): + """ + Returns revision history of a selected container + """ try: imejobjc = self.clinobjc.images.get(imejiden) dispdict = { @@ -155,6 +185,9 @@ class DockerNetworkInformation: self.clinobjc = DockerClient(base_url=unixsock) def get_network_list(self): + """ + Returns list of networks + """ ntwklist = self.clinobjc.networks.list() dispdict = {} for indx in ntwklist: @@ -165,6 +198,9 @@ class DockerNetworkInformation: return dispdict def get_per_network_static_information(self, ntwkiden): + """ + Returns preliminary information of a selected network + """ try: ntwkobjc = self.clinobjc.networks.get(ntwkiden) dispdict = { @@ -185,6 +221,9 @@ class DockerVolumeInformation: self.clinobjc = DockerClient(base_url=unixsock) def get_volume_list(self): + """ + Returns list of volumes + """ volmlist = self.clinobjc.volumes.list() dispdict = {} for indx in volmlist: @@ -195,6 +234,9 @@ class DockerVolumeInformation: return dispdict def get_per_volume_static_information(self, volmiden): + """ + Returns preliminary information of a selected volume + """ try: volmobjc = self.clinobjc.volumes.get(volmiden) dispdict = { diff --git a/dish/frnt.py b/dish/frnt.py index 92b63d0..935e9e7 100644 --- a/dish/frnt.py +++ b/dish/frnt.py @@ -37,6 +37,10 @@ class PreliminaryInformationEndpoint(object): self.unixsock = unixsock def on_get(self, rqst, resp): + """ + Endpoint for fetching container station information + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") if passcode == self.passcode: @@ -59,6 +63,10 @@ class ContainerInformationEndpoint(object): self.unixsock = unixsock def on_get(self, rqst, resp): + """ + Endpoint for fetching container information + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") if passcode == self.passcode: @@ -91,6 +99,10 @@ class ImageInformationEndpoint(object): self.unixsock = unixsock def on_get(self, rqst, resp): + """ + Endpoint for fetching image information + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") if passcode == self.passcode: @@ -117,6 +129,10 @@ class NetworkInformationEndpoint(object): self.unixsock = unixsock def on_get(self, rqst, resp): + """ + Endpoint for fetching network information + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") if passcode == self.passcode: @@ -140,6 +156,10 @@ class VolumeInformationEndpoint(object): self.unixsock = unixsock def on_get(self, rqst, resp): + """ + Endpoint for fetching volume information + Method: GET + """ passcode = rqst.get_param("passcode") opername = rqst.get_param("opername") if passcode == self.passcode: diff --git a/falc.py b/falc.py index 453af3f..d57ef45 100644 --- a/falc.py +++ b/falc.py @@ -68,11 +68,38 @@ class ConnectionExaminationEndpoint(object): @click.command() -@click.option("-p", "--portdata", "portdata", help="Set the port value [0-65536].", default="6969") -@click.option("-u", "--unixsock", "unixsock", help="Set the UNIX socket for Docker.", default="unix://var/run/docker.sock") -@click.option("-6", "--ipprotv6", "netprotc", flag_value="ipprotv6", help="Start the server on an IPv6 address.") -@click.option("-4", "--ipprotv4", "netprotc", flag_value="ipprotv4", help="Start the server on an IPv4 address.") -@click.version_option(version="1.1.0-beta", prog_name=click.style("SuperVisor Driver Service", fg="magenta")) +@click.option( + "-p", + "--portdata", + "portdata", + help="Set the port value [0-65536].", + default="6969" +) +@click.option( + "-u", + "--unixsock", + "unixsock", + help="Set the UNIX socket for Docker.", + default="unix://var/run/docker.sock" +) +@click.option( + "-6", + "--ipprotv6", + "netprotc", + flag_value="ipprotv6", + help="Start the server on an IPv6 address." +) +@click.option( + "-4", + "--ipprotv4", + "netprotc", + flag_value="ipprotv4", + help="Start the server on an IPv4 address." +) +@click.version_option( + version="1.1.0-beta", + prog_name=click.style("SuperVisor Driver Service", fg="magenta") +) def mainfunc(portdata, netprotc, unixsock): try: click.echo( @@ -102,7 +129,6 @@ def mainfunc(portdata, netprotc, unixsock): " * " + click.style("Endpoint service ", bold=True) + ": " + "Falcon v" + flcnvers + "\n" + " * " + click.style("HTTP server ", bold=True) + ": " + "Werkzeug v" + wkzgvers ) - basestat = StatisticalEndpoint(passcode) basepsin = ProcessHandlingEndpoint(passcode) basetool = ProcessControllingEndpoint(passcode) diff --git a/test.py b/test.py deleted file mode 100644 index 43b130f..0000000 --- a/test.py +++ /dev/null @@ -1,1501 +0,0 @@ - -import docker -client = docker.DockerClient(base_url="unix://var/run/docker.sock") - -# Printing client information -print(client.info()) - -# SAMPLE OUTPUT -''' -{ - "ID": "NRDM:32DL:WQOD:IQYR:JKZK:NC62:O3NW:SYNN:YLVM:QANM:7MSW:F4F3", - "Containers": 6, - "ContainersRunning": 6, - "ContainersPaused": 0, - "ContainersStopped": 0, - "Images": 23, - "Driver": "devicemapper", - "DriverStatus": [ - [ - "Pool Name", - "docker-179:2-1049372-pool" - ], - [ - "Pool Blocksize", - "65.54kB" - ], - [ - "Base Device Size", - "10.74GB" - ], - [ - "Backing Filesystem", - "ext4" - ], - [ - "Udev Sync Supported", - "true" - ], - [ - "Data file", - "/dev/loop0" - ], - [ - "Metadata file", - "/dev/loop1" - ], - [ - "Data loop file", - "/var/lib/docker/devicemapper/devicemapper/data" - ], - [ - "Metadata loop file", - "/var/lib/docker/devicemapper/devicemapper/metadata" - ], - [ - "Data Space Used", - "9.043GB" - ], - [ - "Data Space Total", - "107.4GB" - ], - [ - "Data Space Available", - "13.74GB" - ], - [ - "Metadata Space Used", - "25.44MB" - ], - [ - "Metadata Space Total", - "2.147GB" - ], - [ - "Metadata Space Available", - "2.122GB" - ], - [ - "Thin Pool Minimum Free Space", - "10.74GB" - ], - [ - "Deferred Removal Enabled", - "true" - ], - [ - "Deferred Deletion Enabled", - "true" - ], - [ - "Deferred Deleted Device Count", - "0" - ], - [ - "Library Version", - "1.02.170 (2020-03-24)" - ] - ], - "Plugins": { - "Volume": [ - "local" - ], - "Network": [ - "bridge", - "host", - "ipvlan", - "macvlan", - "null", - "overlay" - ], - "Authorization": null, - "Log": [ - "awslogs", - "fluentd", - "gcplogs", - "gelf", - "journald", - "json-file", - "local", - "logentries", - "splunk", - "syslog" - ] - }, - "MemoryLimit": true, - "SwapLimit": true, - "KernelMemory": true, - "KernelMemoryTCP": true, - "CpuCfsPeriod": true, - "CpuCfsQuota": true, - "CPUShares": true, - "CPUSet": true, - "PidsLimit": true, - "IPv4Forwarding": true, - "BridgeNfIptables": true, - "BridgeNfIp6tables": true, - "Debug": false, - "NFd": 112, - "OomKillDisable": true, - "NGoroutines": 132, - "SystemTime": "2021-01-28T16:40:53.758454556Z", - "LoggingDriver": "json-file", - "CgroupDriver": "cgroupfs", - "CgroupVersion": "1", - "NEventsListener": 0, - "KernelVersion": "5.10.10-1-ARCH", - "OperatingSystem": "Arch Linux ARM", - "OSVersion": "", - "OSType": "linux", - "Architecture": "aarch64", - "IndexServerAddress": "https://index.docker.io/v1/", - "RegistryConfig": { - "AllowNondistributableArtifactsCIDRs": [], - "AllowNondistributableArtifactsHostnames": [], - "InsecureRegistryCIDRs": [ - "127.0.0.0/8" - ], - "IndexConfigs": { - "docker.io": { - "Name": "docker.io", - "Mirrors": [], - "Secure": true, - "Official": true - } - }, - "Mirrors": [] - }, - "NCPU": 4, - "MemTotal": 4017565696, - "GenericResources": null, - "DockerRootDir": "/var/lib/docker", - "HttpProxy": "", - "HttpsProxy": "", - "NoProxy": "", - "Name": "alarm", - "Labels": [], - "ExperimentalBuild": false, - "ServerVersion": "20.10.2", - "Runtimes": { - "io.containerd.runc.v2": { - "path": "runc" - }, - "io.containerd.runtime.v1.linux": { - "path": "runc" - }, - "runc": { - "path": "runc" - } - }, - "DefaultRuntime": "runc", - "Swarm": { - "NodeID": "", - "NodeAddr": "", - "LocalNodeState": "inactive", - "ControlAvailable": false, - "Error": "", - "RemoteManagers": null - }, - "LiveRestoreEnabled": false, - "Isolation": "", - "InitBinary": "docker-init", - "ContainerdCommit": { - "ID": "269548fa27e0089a8b8278fc4fc781d7f65a939b.m", - "Expected": "269548fa27e0089a8b8278fc4fc781d7f65a939b.m" - }, - "RuncCommit": { - "ID": "ff819c7e9184c13b7c2607fe6c30ae19403a7aff", - "Expected": "ff819c7e9184c13b7c2607fe6c30ae19403a7aff" - }, - "InitCommit": { - "ID": "de40ad0", - "Expected": "de40ad0" - }, - "SecurityOptions": [ - "name=seccomp,profile=default" - ], - "Warnings": [ - "WARNING: No blkio weight support", - "WARNING: No blkio weight_device support", - "WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release.", - "WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.\n Use `--storage-opt dm.thinpooldev` to specify a custom block storage device." - ] -} -''' - -# Printing version information -print(client.version()) - -# SAMPLE OUTPUT - -''' -{ - "Platform": { - "Name": "" - }, - "Components": [ - { - "Name": "Engine", - "Version": "20.10.2", - "Details": { - "ApiVersion": "1.41", - "Arch": "arm64", - "BuildTime": "2021-01-19T19:14:01.000000000+00:00", - "Experimental": "false", - "GitCommit": "8891c58a43", - "GoVersion": "go1.15.6", - "KernelVersion": "5.10.10-1-ARCH", - "MinAPIVersion": "1.12", - "Os": "linux" - } - }, - { - "Name": "containerd", - "Version": "v1.4.3", - "Details": { - "GitCommit": "269548fa27e0089a8b8278fc4fc781d7f65a939b.m" - } - }, - { - "Name": "runc", - "Version": "1.0.0-rc92", - "Details": { - "GitCommit": "ff819c7e9184c13b7c2607fe6c30ae19403a7aff" - } - }, - { - "Name": "docker-init", - "Version": "0.19.0", - "Details": { - "GitCommit": "de40ad0" - } - } - ], - "Version": "20.10.2", - "ApiVersion": "1.41", - "MinAPIVersion": "1.12", - "GitCommit": "8891c58a43", - "GoVersion": "go1.15.6", - "Os": "linux", - "Arch": "arm64", - "KernelVersion": "5.10.10-1-ARCH", - "BuildTime": "2021-01-19T19:14:01.000000000+00:00" -} -''' - -# Listing running containers -print(client.containers.list()) - -# Per-container information -j = client.containers.list()[0] -j.id # -j.image # -j.labels # -j.name # -j.short_id # -j.status # -j.logs(stream=False) # -j.logs(stream=False).decode() # - -# SAMPLE OUTPUT - -''' -[s6-init] making user provided files available at /var/run/s6/etc...exited 0. -[s6-init] ensuring user provided files have correct perms...exited 0. -[fix-attrs.d] applying ownership & permissions fixes... -[fix-attrs.d] done. -[cont-init.d] executing container initialization scripts... -[cont-init.d] 01-envfile: executing... -[cont-init.d] 01-envfile: exited 0. -[cont-init.d] 10-adduser: executing... - -------------------------------------- - _ () - | | ___ _ __ - | | / __| | | / \ - | | \__ \ | | | () | - |_| |___/ |_| \__/ - - -Brought to you by linuxserver.io -------------------------------------- - -To support LSIO projects visit: -https://www.linuxserver.io/donate/ -------------------------------------- -GID/UID -------------------------------------- - -User uid: 1000 -User gid: 1000 -------------------------------------- - -[cont-init.d] 10-adduser: exited 0. -[cont-init.d] 20-config: executing... -[cont-init.d] 20-config: exited 0. -[cont-init.d] 30-keygen: executing... -using keys found in /config/keys -[cont-init.d] 30-keygen: exited 0. -[cont-init.d] 50-config: executing... -New container detected, installing Heimdall -Setting permissions -[cont-init.d] 50-config: exited 0. -[cont-init.d] 99-custom-files: executing... -[custom-init] no custom files found exiting... -[cont-init.d] 99-custom-files: exited 0. -[cont-init.d] done. -[services.d] starting services -[services.d] done. -[cont-finish.d] executing container finish scripts... -[s6-init] making user provided files available at /var/run/s6/etc...exited 0. -[s6-init] ensuring user provided files have correct perms...exited 0. -[fix-attrs.d] applying ownership & permissions fixes... -[fix-attrs.d] done. -[cont-init.d] executing container initialization scripts... -[cont-init.d] 01-envfile: executing... -[cont-init.d] 01-envfile: exited 0. -[cont-init.d] 10-adduser: executing... -usermod: no changes - -------------------------------------- - _ () - | | ___ _ __ - | | / __| | | / \ - | | \__ \ | | | () | - |_| |___/ |_| \__/ - - -Brought to you by linuxserver.io -------------------------------------- - -To support LSIO projects visit: -https://www.linuxserver.io/donate/ -------------------------------------- -GID/UID -------------------------------------- - -User uid: 1000 -User gid: 1000 -------------------------------------- - -[cont-init.d] 10-adduser: exited 0. -[cont-init.d] 20-config: executing... -[cont-init.d] 20-config: exited 0. -[cont-init.d] 30-keygen: executing... -using keys found in /config/keys -[cont-init.d] 30-keygen: exited 0. -[cont-init.d] 50-config: executing... -Setting permissions -[cont-init.d] 50-config: exited 0. -[cont-init.d] 99-custom-files: executing... -[custom-init] no custom files found exiting... -[cont-init.d] 99-custom-files: exited 0. -[cont-init.d] done. -[services.d] starting services -[services.d] done. -[s6-init] making user provided files available at /var/run/s6/etc...exited 0. -[s6-init] ensuring user provided files have correct perms...exited 0. -[fix-attrs.d] applying ownership & permissions fixes... -[fix-attrs.d] done. -[cont-init.d] executing container initialization scripts... -[cont-init.d] 01-envfile: executing... -[cont-init.d] 01-envfile: exited 0. -[cont-init.d] 10-adduser: executing... -usermod: no changes - -------------------------------------- - _ () - | | ___ _ __ - | | / __| | | / \ - | | \__ \ | | | () | - |_| |___/ |_| \__/ - - -Brought to you by linuxserver.io -------------------------------------- - -To support LSIO projects visit: -https://www.linuxserver.io/donate/ -------------------------------------- -GID/UID -------------------------------------- - -User uid: 1000 -User gid: 1000 -------------------------------------- - -[cont-init.d] 10-adduser: exited 0. -[cont-init.d] 20-config: executing... -[cont-init.d] 20-config: exited 0. -[cont-init.d] 30-keygen: executing... -using keys found in /config/keys -[cont-init.d] 30-keygen: exited 0. -[cont-init.d] 50-config: executing... -Setting permissions -[cont-init.d] 50-config: exited 0. -[cont-init.d] 99-custom-files: executing... -[custom-init] no custom files found exiting... -[cont-init.d] 99-custom-files: exited 0. -[cont-init.d] done. -[services.d] starting services -[services.d] done. -[s6-init] making user provided files available at /var/run/s6/etc...exited 0. -[s6-init] ensuring user provided files have correct perms...exited 0. -[fix-attrs.d] applying ownership & permissions fixes... -[fix-attrs.d] done. -[cont-init.d] executing container initialization scripts... -[cont-init.d] 01-envfile: executing... -[cont-init.d] 01-envfile: exited 0. -[cont-init.d] 10-adduser: executing... -usermod: no changes - -------------------------------------- - _ () - | | ___ _ __ - | | / __| | | / \ - | | \__ \ | | | () | - |_| |___/ |_| \__/ - - -Brought to you by linuxserver.io -------------------------------------- - -To support LSIO projects visit: -https://www.linuxserver.io/donate/ -------------------------------------- -GID/UID -------------------------------------- - -User uid: 1000 -User gid: 1000 -------------------------------------- - -[cont-init.d] 10-adduser: exited 0. -[cont-init.d] 20-config: executing... -[cont-init.d] 20-config: exited 0. -[cont-init.d] 30-keygen: executing... -using keys found in /config/keys -[cont-init.d] 30-keygen: exited 0. -[cont-init.d] 50-config: executing... -Setting permissions -[cont-init.d] 50-config: exited 0. -[cont-init.d] 99-custom-files: executing... -[custom-init] no custom files found exiting... -[cont-init.d] 99-custom-files: exited 0. -[cont-init.d] done. -[services.d] starting services -[services.d] done. -[cont-finish.d] executing container finish scripts... -[cont-finish.d] done. -[s6-finish] waiting for services. -[s6-finish] sending all processes the TERM signal. -[s6-finish] sending all processes the KILL signal and exiting. -[s6-init] making user provided files available at /var/run/s6/etc...exited 0. -[s6-init] ensuring user provided files have correct perms...exited 0. -[fix-attrs.d] applying ownership & permissions fixes... -[fix-attrs.d] done. -[cont-init.d] executing container initialization scripts... -[cont-init.d] 01-envfile: executing... -[cont-init.d] 01-envfile: exited 0. -[cont-init.d] 10-adduser: executing... -usermod: no changes - -------------------------------------- - _ () - | | ___ _ __ - | | / __| | | / \ - | | \__ \ | | | () | - |_| |___/ |_| \__/ - - -Brought to you by linuxserver.io -------------------------------------- - -To support LSIO projects visit: -https://www.linuxserver.io/donate/ -------------------------------------- -GID/UID -------------------------------------- - -User uid: 1000 -User gid: 1000 -------------------------------------- - -[cont-init.d] 10-adduser: exited 0. -[cont-init.d] 20-config: executing... -[cont-init.d] 20-config: exited 0. -[cont-init.d] 30-keygen: executing... -using keys found in /config/keys -[cont-init.d] 30-keygen: exited 0. -[cont-init.d] 50-config: executing... -Setting permissions -[cont-init.d] 50-config: exited 0. -[cont-init.d] 99-custom-files: executing... -[custom-init] no custom files found exiting... -[cont-init.d] 99-custom-files: exited 0. -[cont-init.d] done. -[services.d] starting services -[services.d] done. -''' - -j.stats(stream=False) # - -# SAMPLE OUTPUT - -''' -{ - "read": "2021-01-28T16:47:14.57043359Z", - "preread": "2021-01-28T16:47:13.564934527Z", - "pids_stats": { - "current": 16 - }, - "blkio_stats": { - "io_service_bytes_recursive": [ - { - "major": 7, - "minor": 0, - "op": "Read", - "value": 47042560 - }, - { - "major": 7, - "minor": 0, - "op": "Write", - "value": 90112 - }, - { - "major": 7, - "minor": 0, - "op": "Sync", - "value": 47050752 - }, - { - "major": 7, - "minor": 0, - "op": "Async", - "value": 81920 - }, - { - "major": 7, - "minor": 0, - "op": "Discard", - "value": 0 - }, - { - "major": 7, - "minor": 0, - "op": "Total", - "value": 47132672 - }, - { - "major": 253, - "minor": 0, - "op": "Read", - "value": 47042560 - }, - { - "major": 253, - "minor": 0, - "op": "Write", - "value": 90112 - }, - { - "major": 253, - "minor": 0, - "op": "Sync", - "value": 47050752 - }, - { - "major": 253, - "minor": 0, - "op": "Async", - "value": 81920 - }, - { - "major": 253, - "minor": 0, - "op": "Discard", - "value": 0 - }, - { - "major": 253, - "minor": 0, - "op": "Total", - "value": 47132672 - }, - { - "major": 253, - "minor": 2, - "op": "Read", - "value": 47042560 - }, - { - "major": 253, - "minor": 2, - "op": "Write", - "value": 90112 - }, - { - "major": 253, - "minor": 2, - "op": "Sync", - "value": 47050752 - }, - { - "major": 253, - "minor": 2, - "op": "Async", - "value": 81920 - }, - { - "major": 253, - "minor": 2, - "op": "Discard", - "value": 0 - }, - { - "major": 253, - "minor": 2, - "op": "Total", - "value": 47132672 - }, - { - "major": 179, - "minor": 0, - "op": "Read", - "value": 2465792 - }, - { - "major": 179, - "minor": 0, - "op": "Write", - "value": 4096 - }, - { - "major": 179, - "minor": 0, - "op": "Sync", - "value": 2465792 - }, - { - "major": 179, - "minor": 0, - "op": "Async", - "value": 4096 - }, - { - "major": 179, - "minor": 0, - "op": "Discard", - "value": 0 - }, - { - "major": 179, - "minor": 0, - "op": "Total", - "value": 2469888 - } - ], - "io_serviced_recursive": [ - { - "major": 7, - "minor": 0, - "op": "Read", - "value": 3587 - }, - { - "major": 7, - "minor": 0, - "op": "Write", - "value": 13 - }, - { - "major": 7, - "minor": 0, - "op": "Sync", - "value": 3589 - }, - { - "major": 7, - "minor": 0, - "op": "Async", - "value": 11 - }, - { - "major": 7, - "minor": 0, - "op": "Discard", - "value": 0 - }, - { - "major": 7, - "minor": 0, - "op": "Total", - "value": 3600 - }, - { - "major": 253, - "minor": 0, - "op": "Read", - "value": 3587 - }, - { - "major": 253, - "minor": 0, - "op": "Write", - "value": 13 - }, - { - "major": 253, - "minor": 0, - "op": "Sync", - "value": 3589 - }, - { - "major": 253, - "minor": 0, - "op": "Async", - "value": 11 - }, - { - "major": 253, - "minor": 0, - "op": "Discard", - "value": 0 - }, - { - "major": 253, - "minor": 0, - "op": "Total", - "value": 3600 - }, - { - "major": 253, - "minor": 2, - "op": "Read", - "value": 3137 - }, - { - "major": 253, - "minor": 2, - "op": "Write", - "value": 13 - }, - { - "major": 253, - "minor": 2, - "op": "Sync", - "value": 3139 - }, - { - "major": 253, - "minor": 2, - "op": "Async", - "value": 11 - }, - { - "major": 253, - "minor": 2, - "op": "Discard", - "value": 0 - }, - { - "major": 253, - "minor": 2, - "op": "Total", - "value": 3150 - }, - { - "major": 179, - "minor": 0, - "op": "Read", - "value": 487 - }, - { - "major": 179, - "minor": 0, - "op": "Write", - "value": 1 - }, - { - "major": 179, - "minor": 0, - "op": "Sync", - "value": 487 - }, - { - "major": 179, - "minor": 0, - "op": "Async", - "value": 1 - }, - { - "major": 179, - "minor": 0, - "op": "Discard", - "value": 0 - }, - { - "major": 179, - "minor": 0, - "op": "Total", - "value": 488 - } - ], - "io_queue_recursive": [], - "io_service_time_recursive": [], - "io_wait_time_recursive": [], - "io_merged_recursive": [], - "io_time_recursive": [], - "sectors_recursive": [] - }, - "num_procs": 0, - "storage_stats": {}, - "cpu_stats": { - "cpu_usage": { - "total_usage": 23964363902, - "percpu_usage": [ - 4580207653, - 9390755702, - 4317221070, - 5676179477 - ], - "usage_in_kernelmode": 3450000000, - "usage_in_usermode": 20090000000 - }, - "system_cpu_usage": 197655370000000, - "online_cpus": 4, - "throttling_data": { - "periods": 0, - "throttled_periods": 0, - "throttled_time": 0 - } - }, - "precpu_stats": { - "cpu_usage": { - "total_usage": 23964330532, - "percpu_usage": [ - 4580207653, - 9390722332, - 4317221070, - 5676179477 - ], - "usage_in_kernelmode": 3450000000, - "usage_in_usermode": 20090000000 - }, - "system_cpu_usage": 197651360000000, - "online_cpus": 4, - "throttling_data": { - "periods": 0, - "throttled_periods": 0, - "throttled_time": 0 - } - }, - "memory_stats": { - "usage": 55132160, - "max_usage": 61685760, - "stats": { - "active_anon": 0, - "active_file": 6733824, - "cache": 19329024, - "dirty": 135168, - "hierarchical_memory_limit": 9223372036854771712, - "hierarchical_memsw_limit": 9223372036854771712, - "inactive_anon": 31764480, - "inactive_file": 12406784, - "mapped_file": 8515584, - "pgfault": 35937, - "pgmajfault": 1287, - "pgpgin": 31977, - "pgpgout": 19517, - "rss": 31899648, - "rss_huge": 0, - "total_active_anon": 0, - "total_active_file": 6733824, - "total_cache": 19329024, - "total_dirty": 135168, - "total_inactive_anon": 31764480, - "total_inactive_file": 12406784, - "total_mapped_file": 8515584, - "total_pgfault": 35937, - "total_pgmajfault": 1287, - "total_pgpgin": 31977, - "total_pgpgout": 19517, - "total_rss": 31899648, - "total_rss_huge": 0, - "total_unevictable": 0, - "total_writeback": 135168, - "unevictable": 0, - "writeback": 135168 - }, - "limit": 4017565696 - }, - "name": "/heimdall", - "id": "360340a08b7ab9c5b56788f91474e4b336d2863cd01c7175270e2ef66220f497", - "networks": { - "eth0": { - "rx_bytes": 40111, - "rx_packets": 426, - "rx_errors": 0, - "rx_dropped": 0, - "tx_bytes": 1102841, - "tx_packets": 375, - "tx_errors": 0, - "tx_dropped": 0 - } - } -} -''' - -j.top() # - -''' -{ - "Processes": [ - [ - "root", - "5463", - "5445", - "0", - "04:12", - "?", - "00:00:00", - "s6-svscan -t0 /var/run/s6/services" - ], - [ - "root", - "5531", - "5463", - "0", - "04:12", - "?", - "00:00:00", - "s6-supervise s6-fdholderd" - ], - [ - "root", - "5812", - "5463", - "0", - "04:12", - "?", - "00:00:00", - "s6-supervise nginx" - ], - [ - "root", - "5813", - "5463", - "0", - "04:12", - "?", - "00:00:00", - "s6-supervise queue" - ], - [ - "root", - "5815", - "5463", - "0", - "04:12", - "?", - "00:00:00", - "s6-supervise php-fpm" - ], - [ - "root", - "5816", - "5463", - "0", - "04:12", - "?", - "00:00:00", - "s6-supervise cron" - ], - [ - "alarm", - "5818", - "5813", - "0", - "04:12", - "?", - "00:00:20", - "php /var/www/localhost/heimdall/artisan queue:work database --sleep=3 --tries=3" - ], - [ - "root", - "5819", - "5812", - "0", - "04:12", - "?", - "00:00:00", - "nginx: master process /usr/sbin/nginx -c /config/nginx/nginx.conf" - ], - [ - "root", - "5820", - "5816", - "0", - "04:12", - "?", - "00:00:00", - "/usr/sbin/crond -f -S -l 5 -c /etc/crontabs" - ], - [ - "root", - "5822", - "5815", - "0", - "04:12", - "?", - "00:00:01", - "php-fpm: master process (/etc/php7/php-fpm.conf)" - ], - [ - "alarm", - "5842", - "5819", - "0", - "04:12", - "?", - "00:00:00", - "nginx: worker process" - ], - [ - "alarm", - "5843", - "5819", - "0", - "04:12", - "?", - "00:00:00", - "nginx: worker process" - ], - [ - "alarm", - "5844", - "5819", - "0", - "04:12", - "?", - "00:00:00", - "nginx: worker process" - ], - [ - "alarm", - "5845", - "5819", - "0", - "04:12", - "?", - "00:00:00", - "nginx: worker process" - ], - [ - "alarm", - "5846", - "5822", - "0", - "04:12", - "?", - "00:00:00", - "php-fpm: pool www" - ], - [ - "alarm", - "5847", - "5822", - "0", - "04:12", - "?", - "00:00:00", - "php-fpm: pool www" - ] - ], - "Titles": [ - "UID", - "PID", - "PPID", - "C", - "STIME", - "TTY", - "TIME", - "CMD" - ] -} -''' - -# Per-image information -j.image.attrs # - -# SAMPLE OUTPUT - -''' -{ - "Id": "sha256:c05e909a5a07bf6743bda6406592f9e0d9e9a85a357b2ee32dea6788855e70fe", - "RepoTags": [ - "linuxserver/heimdall:latest" - ], - "RepoDigests": [ - "linuxserver/heimdall@sha256:9cf0002855ab15758dfad10997efab0b388672490711664e5199ec5e5a8e8579" - ], - "Parent": "", - "Comment": "", - "Created": "2021-01-15T06:34:00.510644721Z", - "Container": "", - "ContainerConfig": { - "Hostname": "", - "Domainname": "", - "User": "", - "AttachStdin": false, - "AttachStdout": false, - "AttachStderr": false, - "ExposedPorts": { - "443/tcp": {}, - "80/tcp": {} - }, - "Tty": false, - "OpenStdin": false, - "StdinOnce": false, - "Env": [ - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "PS1=$(whoami)@$(hostname):$(pwd)\\$ ", - "HOME=/root", - "TERM=xterm", - "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" - ], - "Cmd": [ - "/bin/sh", - "-c", - "#(nop) COPY dir:50d2f28c52d1224e0c176ad89512b9b0b7daf607120b0723506867dc3122e1fd in / " - ], - "Image": "sha256:7070a625aceeb2c60f59767ee415ad6259959b8cf189e62ab3e643cc2b2043c1", - "Volumes": { - "/config": {} - }, - "WorkingDir": "", - "Entrypoint": [ - "/init" - ], - "OnBuild": null, - "Labels": { - "build_version": "Linuxserver.io version:- 2.2.2-ls113 Build-date:- 2021-01-15T06:32:32+00:00", - "maintainer": "aptalca" - } - }, - "DockerVersion": "20.10.2", - "Author": "", - "Config": { - "Hostname": "", - "Domainname": "", - "User": "", - "AttachStdin": false, - "AttachStdout": false, - "AttachStderr": false, - "ExposedPorts": { - "443/tcp": {}, - "80/tcp": {} - }, - "Tty": false, - "OpenStdin": false, - "StdinOnce": false, - "Env": [ - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "PS1=$(whoami)@$(hostname):$(pwd)\\$ ", - "HOME=/root", - "TERM=xterm", - "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" - ], - "Cmd": null, - "Image": "sha256:7070a625aceeb2c60f59767ee415ad6259959b8cf189e62ab3e643cc2b2043c1", - "Volumes": { - "/config": {} - }, - "WorkingDir": "", - "Entrypoint": [ - "/init" - ], - "OnBuild": null, - "Labels": { - "build_version": "Linuxserver.io version:- 2.2.2-ls113 Build-date:- 2021-01-15T06:32:32+00:00", - "maintainer": "aptalca" - } - }, - "Architecture": "arm64", - "Variant": "v8", - "Os": "linux", - "Size": 91338738, - "VirtualSize": 91338738, - "GraphDriver": { - "Data": { - "DeviceId": "105", - "DeviceName": "docker-179:2-1049372-f9c76abbb914d6b93d619aa18e24ae6c0a751923ea156fff417b318ff085e3f0", - "DeviceSize": "10737418240" - }, - "Name": "devicemapper" - }, - "RootFS": { - "Type": "layers", - "Layers": [ - "sha256:fdf68b32143970fdfe941d96e18001467a4dd37d4411ac5308727bab14f7b03b", - "sha256:279eb88f2fc871c145bed0f6e7cd6851a01e291906473ba217d98665203dcbb2", - "sha256:29069ff6494bb13219ea10a6a2cdd19859d887823fbb452f682c9a513c8eb8c4", - "sha256:127c9d166be9eefea4a3b6189b21d876120bd0ad63416f43c069f93f3ed5d9b4", - "sha256:f5c574eb12d23251f1922ac794c60da31632a482c612146943b30aa94d4b1699", - "sha256:2a35d0a1a39469ed203090d46fce3fdd0ebd6db6b7e412d8bea990ed20cd6b2d", - "sha256:1587025e855779aee1b597ef8647a68549cbcc027cdecf21a1e427f0b029703a", - "sha256:13a685f575cffbfe02fe9c7639685a87fe47830529c1be0655e516954bca6683", - "sha256:daff46243e3b2ae85dca4c859a905443fed955c11cd2d5e020b479bd8612eb94" - ] - }, - "Metadata": { - "LastTagTime": "0001-01-01T00:00:00Z" - } -} -''' - -j.image.id # - -j.image.labels # - -# SAMPLE OUTPUT - -''' -{ - "build_version": "Linuxserver.io version:- 2.2.2-ls113 Build-date:- 2021-01-15T06:32:32+00:00", - "maintainer": "aptalca" -} -''' - -''' -{ - "org.label-schema.build-date": "20201204", - "org.label-schema.license": "GPLv2", - "org.label-schema.name": "CentOS Base Image", - "org.label-schema.schema-version": "1.0", - "org.label-schema.vendor": "CentOS" -} -''' - -j.image.short_id # -j.image.tags # - -# SAMPLE OUTPUT - -''' -[ - "centos:code-server" -] -''' - -j.image.history() # - -# SAMPLE OUTPUT - -''' -[ - { - "Comment": "", - "Created": 1611682947, - "CreatedBy": "/bin/sh -c #(nop) VOLUME [/config]", - "Id": "sha256:c7be7c07415c5a1b4e24bf7b13cf0c40dbc9867256d3749c16dc28c3146fb0f3", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682946, - "CreatedBy": "/bin/sh -c #(nop) EXPOSE 1900/udp 3005/tcp 32400/tcp 32410/udp 32412/udp 32413/udp 32414/udp 32469/tcp 5353/udp 8324/tcp", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682944, - "CreatedBy": "/bin/sh -c #(nop) COPY dir:54e6f0d31377700bd5ccb5b2a2412b03ca3f924ea0134f6a2098bdcfdbe2a49b in / ", - "Id": "", - "Size": 9922, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682927, - "CreatedBy": "|3 BUILD_DATE=2021-01-26T17:39:30+00:00 PLEX_RELEASE=1.21.2.3939-3945797bd VERSION=1.21.2.3939-3945797bd-ls20 /bin/sh -c echo \"**** install runtime packages ****\" && apt-get update && apt-get install -y \tjq \tudev \tunrar \twget && echo \"**** install plex ****\" && if [ -z ${PLEX_RELEASE+x} ]; then PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' | jq -r '.computer.Linux.version'); fi && curl -o \t/tmp/plexmediaserver.deb -L \t\"${PLEX_DOWNLOAD}/${PLEX_RELEASE}/debian/plexmediaserver_${PLEX_RELEASE}_${PLEX_ARCH}.deb\" && dpkg -i /tmp/plexmediaserver.deb && echo \"**** ensure abc user's home folder is /app ****\" && usermod -d /app abc && echo \"**** cleanup ****\" && apt-get clean && rm -rf \t/etc/default/plexmediaserver \t/tmp/* \t/var/lib/apt/lists/* \t/var/tmp/*", - "Id": "", - "Size": 215721403, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682852, - "CreatedBy": "/bin/sh -c #(nop) ENV DEBIAN_FRONTEND=noninteractive PLEX_DOWNLOAD=https://downloads.plex.tv/plex-media-server-new PLEX_ARCH=arm64 PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/config/Library/Application Support PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 PLEX_MEDIA_SERVER_USER=abc PLEX_MEDIA_SERVER_INFO_VENDOR=Docker PLEX_MEDIA_SERVER_INFO_DEVICE=Docker Container (LinuxServer.io)", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682851, - "CreatedBy": "/bin/sh -c #(nop) LABEL maintainer=thelamer", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682849, - "CreatedBy": "/bin/sh -c #(nop) LABEL build_version=Linuxserver.io version:- 1.21.2.3939-3945797bd-ls20 Build-date:- 2021-01-26T17:39:30+00:00", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682848, - "CreatedBy": "/bin/sh -c #(nop) ARG PLEX_RELEASE", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682847, - "CreatedBy": "/bin/sh -c #(nop) ARG VERSION", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611682844, - "CreatedBy": "/bin/sh -c #(nop) ARG BUILD_DATE", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637837, - "CreatedBy": "/bin/sh -c #(nop) ENTRYPOINT [\"/init\"]", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637835, - "CreatedBy": "/bin/sh -c #(nop) COPY dir:643a650c063c923b6bde607ed6d0259227130c48523761aade9a41628ded66d7 in / ", - "Id": "", - "Size": 14754, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637827, - "CreatedBy": "|5 BUILD_DATE=2021-01-26T05:05:04+00:00 DEBIAN_FRONTEND=noninteractive OVERLAY_ARCH=aarch64 OVERLAY_VERSION=v2.1.0.2 VERSION=fd2376ac-ls25 /bin/sh -c echo \"**** Ripped from Ubuntu Docker Logic ****\" && set -xe && echo '#!/bin/sh' \t> /usr/sbin/policy-rc.d && echo 'exit 101' \t>> /usr/sbin/policy-rc.d && chmod +x \t/usr/sbin/policy-rc.d && dpkg-divert --local --rename --add /sbin/initctl && cp -a \t/usr/sbin/policy-rc.d \t/sbin/initctl && sed -i \t's/^exit.*/exit 0/' \t/sbin/initctl && echo 'force-unsafe-io' \t> /etc/dpkg/dpkg.cfg.d/docker-apt-speedup && echo 'DPkg::Post-Invoke { \"rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true\"; };' \t> /etc/apt/apt.conf.d/docker-clean && echo 'APT::Update::Post-Invoke { \"rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true\"; };' \t>> /etc/apt/apt.conf.d/docker-clean && echo 'Dir::Cache::pkgcache \"\"; Dir::Cache::srcpkgcache \"\";' \t>> /etc/apt/apt.conf.d/docker-clean && echo 'Acquire::Languages \"none\";' \t> /etc/apt/apt.conf.d/docker-no-languages && echo 'Acquire::GzipIndexes \"true\"; Acquire::CompressionTypes::Order:: \"gz\";' \t> /etc/apt/apt.conf.d/docker-gzip-indexes && echo 'Apt::AutoRemove::SuggestsImportant \"false\";' \t> /etc/apt/apt.conf.d/docker-autoremove-suggests && mkdir -p /run/systemd && echo 'docker' \t> /run/systemd/container && echo \"**** install apt-utils and locales ****\" && apt-get update && apt-get install -y \tapt-utils \tlocales && echo \"**** install packages ****\" && apt-get install -y \tcurl \tgnupg \ttzdata && echo \"**** generate locale ****\" && locale-gen en_US.UTF-8 && echo \"**** create abc user and make our folders ****\" && useradd -u 911 -U -d /config -s /bin/false abc && usermod -G users abc && mkdir -p \t/app \t/config \t/defaults && mv /usr/bin/with-contenv /usr/bin/with-contenvb && echo \"**** add qemu ****\" && curl -o /usr/bin/qemu-aarch64-static -L \t\"https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static\" && chmod +x /usr/bin/qemu-aarch64-static && echo \"**** cleanup ****\" && apt-get clean && rm -rf \t/tmp/* \t/var/lib/apt/lists/* \t/var/tmp/*", - "Id": "", - "Size": 49712129, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637710, - "CreatedBy": "/bin/sh -c #(nop) COPY file:7c0649cb600aa6c72cfc6188617e4e394e832e723897e1fcd0655af5f631ac68 in /etc/apt/ ", - "Id": "", - "Size": 884, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637709, - "CreatedBy": "/bin/sh -c #(nop) ENV HOME=/root LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 TERM=xterm", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637706, - "CreatedBy": "/bin/sh -c #(nop) ARG DEBIAN_FRONTEND=noninteractive", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637704, - "CreatedBy": "|4 BUILD_DATE=2021-01-26T05:05:04+00:00 OVERLAY_ARCH=aarch64 OVERLAY_VERSION=v2.1.0.2 VERSION=fd2376ac-ls25 /bin/sh -c chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer", - "Id": "", - "Size": 5991535, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637688, - "CreatedBy": "/bin/sh -c #(nop) ADD 4f58740c4ce0b21f8d45d774ff3cd81a980d7cabc9f47ef8e46a619ccc3f7559 in /tmp/ ", - "Id": "", - "Size": 6255344, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637684, - "CreatedBy": "/bin/sh -c #(nop) ARG OVERLAY_ARCH=aarch64", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637682, - "CreatedBy": "/bin/sh -c #(nop) ARG OVERLAY_VERSION=v2.1.0.2", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637681, - "CreatedBy": "/bin/sh -c #(nop) LABEL maintainer=TheLamer", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637679, - "CreatedBy": "/bin/sh -c #(nop) LABEL build_version=Linuxserver.io version:- fd2376ac-ls25 Build-date:- 2021-01-26T05:05:04+00:00", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637677, - "CreatedBy": "/bin/sh -c #(nop) ARG VERSION", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637676, - "CreatedBy": "/bin/sh -c #(nop) ARG BUILD_DATE", - "Id": "", - "Size": 0, - "Tags": null - }, - { - "Comment": "", - "Created": 1611637664, - "CreatedBy": "/bin/sh -c #(nop) COPY dir:0376870dce13fe7fca7fb7b81e82ee89d85446f7738f6ee4f4a61e280cc627c2 in / ", - "Id": "", - "Size": 65677970, - "Tags": null - } -] -''' -