(self, layer_id, comment="created by udocker")
return container_json
Create metadata for a given container layer, used in import.
        A file for import is a tarball of a directory tree, does not contain
        metadata. This method creates minimal metadata.
Create metadata for a given container layer, used in import.
        A file for import is a tarball of a directory tree, does not contain
        metadata. This method creates minimal metadata.
Create metadata for a given container layer used in import . A file for import is a tarball of a directory tree does not contain metadata . This method creates minimal metadata .
def create_container_meta(self, layer_id, comment="created by udocker"):
        """Create metadata for a given container layer, used in import.
        A file for import is a tarball of a directory tree, does not contain
        metadata. This method creates minimal metadata.
        """
        container_json = dict()
        container_json["id"] = layer_id
        container_json["comment"] = comment
        container_json["created"] = \
            time.strftime("%Y-%m-%dT%H:%M:%S.000000000Z")
        container_json["architecture"] = HostInfo().arch()
        container_json["os"] = HostInfo().osversion()
        layer_file = self.localrepo.layersdir + '/' + layer_id + ".layer"
        container_json["size"] = FileUtil(layer_file).size()
        if container_json["size"] == -1:
            container_json["size"] = 0
        container_json["container_config"] = {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "Memory": 0,
            "MemorySwap": 0,
            "CpusShares": 0,
            "Cpuset": "",
            "AttachStdin": False,
            "AttachStdout": False,
            "AttachStderr": False,
            "PortSpecs": None,
            "ExposedPorts": None,
            "Tty": False,
            "OpenStdin": False,
            "StdinOnce": False,
            "Env": None,
            "Cmd": None,
            "Image": "",
            "Volumes": None,
            "WorkingDir": "",
            "Entrypoint": None,
            "NetworkDisable": False,
            "MacAddress": "",
            "OnBuild": None,
            "Labels": None
        }
        container_json["config"] = {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "Memory": 0,
            "MemorySwap": 0,
            "CpusShares": 0,
            "Cpuset": "",
            "AttachStdin": False,
            "AttachStdout": False,
            "AttachStderr": False,
            "PortSpecs": None,
            "ExposedPorts": None,
            "Tty": False,
            "OpenStdin": False,
            "StdinOnce": False,
            "Env": None,
            "Cmd": None,
            "Image": "",
            "Volumes": None,
            "WorkingDir": "",
            "Entrypoint": None,
            "NetworkDisable": False,
            "MacAddress": "",
            "OnBuild": None,
            "Labels": None
        }
        return container_json
def create_container_meta ( self , layer_id , comment = "created by udocker" ) : container_json = dict ( ) container_json [ "id" ] = layer_id container_json [ "comment" ] = comment container_json [ "created" ] = time . strftime ( "%Y-%m-%dT%H:%M:%S.000000000Z" ) container_json [ "architecture" ] = HostInfo ( ) . arch ( ) container_json [ "os" ] = HostInfo ( ) . osversion ( ) layer_file = self . localrepo . layersdir + '/' + layer_id + ".layer" container_json [ "size" ] = FileUtil ( layer_file ) . size ( ) if container_json [ "size" ] == - 1 : container_json [ "size" ] = 0 container_json [ "container_config" ] = { "Hostname" : "" , "Domainname" : "" , "User" : "" , "Memory" : 0 , "MemorySwap" : 0 , "CpusShares" : 0 , "Cpuset" : "" , "AttachStdin" : False , "AttachStdout" : False , "AttachStderr" : False , "PortSpecs" : None , "ExposedPorts" : None , "Tty" : False , "OpenStdin" : False , "StdinOnce" : False , "Env" : None , "Cmd" : None , "Image" : "" , "Volumes" : None , "WorkingDir" : "" , "Entrypoint" : None , "NetworkDisable" : False , "MacAddress" : "" , "OnBuild" : None , "Labels" : None } container_json [ "config" ] = { "Hostname" : "" , "Domainname" : "" , "User" : "" , "Memory" : 0 , "MemorySwap" : 0 , "CpusShares" : 0 , "Cpuset" : "" , "AttachStdin" : False , "AttachStdout" : False , "AttachStderr" : False , "PortSpecs" : None , "ExposedPorts" : None , "Tty" : False , "OpenStdin" : False , "StdinOnce" : False , "Env" : None , "Cmd" : None , "Image" : "" , "Volumes" : None , "WorkingDir" : "" , "Entrypoint" : None , "NetworkDisable" : False , "MacAddress" : "" , "OnBuild" : None , "Labels" : None } return container_json