Commands

Submitted by Lizhe on Sat, 04/01/2017 - 16:19

docker pull centos

docker pull daocloud.io/library/centos:latest

docker run --name test -i -t 2785d012ae3e

ctrl p q

 

 

 

[root@VM_167_46_centos ~]# docker inspect test
[
{
    "Id": "ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006",
    "Created": "2017-04-01T09:11:54.853941922Z",
    "Path": "/bin/bash",
    "Args": [],
    "State": {
        "Status": "running",
        "Running": true,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 28257,
        "ExitCode": 0,
        "Error": "",
        "StartedAt": "2017-04-01T09:11:55.873516063Z",
        "FinishedAt": "0001-01-01T00:00:00Z"
    },
    "Image": "2785d012ae3e08a253360c00f174fd09301ec1cce64ab7a1dedc52a673845d67",
    "ResolvConfPath": "/data/docker/containers/ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006/resolv.conf",
    "HostnamePath": "/data/docker/containers/ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006/hostname",
    "HostsPath": "/data/docker/containers/ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006/hosts",
    "LogPath": "/data/docker/containers/ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006/ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006-json.log",
    "Name": "/test",
    "RestartCount": 0,
    "Driver": "devicemapper",
    "ExecDriver": "native-0.2",
    "MountLabel": "",
    "ProcessLabel": "",
    "AppArmorProfile": "",
    "ExecIDs": null,
    "HostConfig": {
        "Binds": null,
        "ContainerIDFile": "",
        "LxcConf": [],
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "KernelMemory": 0,
        "CpuShares": 0,
        "CpuPeriod": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "CpuQuota": 0,
        "BlkioWeight": 0,
        "OomKillDisable": false,
        "MemorySwappiness": -1,
        "Privileged": false,
        "PortBindings": {},
        "Links": null,
        "PublishAllPorts": false,
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": null,
        "VolumesFrom": null,
        "Devices": [],
        "NetworkMode": "default",
        "IpcMode": "",
        "PidMode": "",
        "UTSMode": "",
        "CapAdd": null,
        "CapDrop": null,
        "GroupAdd": null,
        "RestartPolicy": {
            "Name": "no",
            "MaximumRetryCount": 0
        },
        "SecurityOpt": null,
        "ReadonlyRootfs": false,
        "Ulimits": null,
        "LogConfig": {
            "Type": "json-file",
            "Config": {}
        },
        "CgroupParent": "",
        "ConsoleSize": [
            0,
            0
        ],
        "VolumeDriver": ""
    },
    "GraphDriver": {
        "Name": "devicemapper",
        "Data": {
            "DeviceId": "44",
            "DeviceName": "docker-253:17-262148-ee7a2854e4f3c47202cca785f2dd690e5a6056b157f2cd3a748fa180b7907006",
            "DeviceSize": "107374182400"
        }
    },
    "Mounts": [],
    "Config": {
        "Hostname": "ee7a2854e4f3",
        "Domainname": "",
        "User": "",
        "AttachStdin": true,
        "AttachStdout": true,
        "AttachStderr": true,
        "Tty": true,
        "OpenStdin": true,
        "StdinOnce": true,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        ],
        "Cmd": [
            "/bin/bash"
        ],
        "Image": "2785d012ae3e",
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": {
            "build-date": "20161214",
            "license": "GPLv2",
            "name": "CentOS Base Image",
            "vendor": "CentOS"
        },
        "StopSignal": "SIGTERM"
    },
    "NetworkSettings": {
        "Bridge": "",
        "SandboxID": "a40c2e6f1ebcb393c49c4d2b9477cb7346228c9bd157bee755f1fa2ea1b31634",
        "HairpinMode": false,
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "Ports": {},
        "SandboxKey": "/var/run/docker/netns/a40c2e6f1ebc",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null,
        "EndpointID": "93dd4c5e441a373c065724597df0a7d32bf867d5f304c73d1e6c636a5896b94f",
        "Gateway": "172.17.0.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "172.17.0.2",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "MacAddress": "02:42:ac:11:00:02",
        "Networks": {
            "bridge": {
                "EndpointID": "93dd4c5e441a373c065724597df0a7d32bf867d5f304c73d1e6c636a5896b94f",
                "Gateway": "172.17.0.1",
                "IPAddress": "172.17.0.2",
                "IPPrefixLen": 16,
                "IPv6Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "MacAddress": "02:42:ac:11:00:02"
            }
        }
    }
}
]
[root@VM_167_46_centos ~]#