- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我关注了“开始”tutorial在官方 docker 网站上,一切顺利,直到我尝试删除容器。每次运行的时候
docker rm -f [container_id]
或
docker stop -f [container_id]
具有该 ID 的初始容器停止或删除,但新容器出现并运行。我尝试使用以下命令更新容器:
docker update --restart=no $(docker ps -aq)
然而这并没有帮助。
这里'docker info'命令结果:
$ docker info
Containers: 5
Running: 5
Paused: 0
Stopped: 0
Images: 1
Server Version: 17.05.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 22
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: active
NodeID: qpmjeqewpl5hnneuhm99dp7g7
Is Manager: true
ClusterID: x14jwe053zapko55g7edlh9fp
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.0.108
Manager Addresses:
192.168.0.108:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.10.0-28-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.74GiB
Name: roman-LIFEBOOK-AH531
ID: BHNU:2PGO:UDAA:MFYE:XGLO:R4PS:27QR:GXF6:KZME:W4EN:C5VO:FIJM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: rmcontkit
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
和'docker inspect [container_id]'
$ docker inspect f53643ac5f9b
[
{
"Id": "f53643ac5f9b105c6b0d09de43eecd01f9d8bc3a20c71a535c1a25818db64775",
"Created": "2017-07-30T15:03:23.009739796Z",
"Path": "python",
"Args": [
"app.py"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 10661,
"ExitCode": 0,
"Error": "",
"StartedAt": "2017-07-30T15:03:30.614115776Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:413941614a833af57c05119d70cae063e0dc164b919e8ec84c6af595e7225b85",
"ResolvConfPath": "/var/lib/docker/containers/f53643ac5f9b105c6b0d09de43eecd01f9d8bc3a20c71a535c1a25818db64775/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/f53643ac5f9b105c6b0d09de43eecd01f9d8bc3a20c71a535c1a25818db64775/hostname",
"HostsPath": "/var/lib/docker/containers/f53643ac5f9b105c6b0d09de43eecd01f9d8bc3a20c71a535c1a25818db64775/hosts",
"LogPath": "/var/lib/docker/containers/f53643ac5f9b105c6b0d09de43eecd01f9d8bc3a20c71a535c1a25818db64775/f53643ac5f9b105c6b0d09de43eecd01f9d8bc3a20c71a535c1a25818db64775-json.log",
"Name": "/getstartedlab_web.2.yr7k0egu4ketu7m0kdxt7v3o7",
"RestartCount": 0,
"Driver": "aufs",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 52428800,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 100000,
"CpuQuota": 10000,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": -1,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"Mounts": [],
"Config": {
"Hostname": "f53643ac5f9b",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF",
"PYTHON_VERSION=2.7.13",
"PYTHON_PIP_VERSION=9.0.1",
"NAME=World"
],
"Cmd": [
"python",
"app.py"
],
"ArgsEscaped": true,
"Image": "rmcontkit/get-started:part1@sha256:e7c1e776eb3eca11213449a8621cc84f989cb127350c3207ae8c610d482c0398",
"Volumes": null,
"WorkingDir": "/app",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.stack.namespace": "getstartedlab",
"com.docker.swarm.node.id": "qpmjeqewpl5hnneuhm99dp7g7",
"com.docker.swarm.service.id": "8dj5jmxiqcip81ay1we2yd8uc",
"com.docker.swarm.service.name": "getstartedlab_web",
"com.docker.swarm.task": "",
"com.docker.swarm.task.id": "yr7k0egu4ketu7m0kdxt7v3o7",
"com.docker.swarm.task.name": "getstartedlab_web.2.yr7k0egu4ketu7m0kdxt7v3o7"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "e6d8f06b6ca25b73c100921213fe47dd4fc93eaf95db09be2dc0191b989aa139",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"80/tcp": null
},
"SandboxKey": "/var/run/docker/netns/e6d8f06b6ca2",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"getstartedlab_webnet": {
"IPAMConfig": {
"IPv4Address": "10.0.0.7"
},
"Links": null,
"Aliases": [
"f53643ac5f9b"
],
"NetworkID": "k3as780fjdoywrdxdiabned7u",
"EndpointID": "44933d5909d3ff46c34e9a28317d5eaf025497ab61b951dbf054853415634c6e",
"Gateway": "",
"IPAddress": "10.0.0.7",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:0a:00:00:07"
},
"ingress": {
"IPAMConfig": {
"IPv4Address": "10.255.0.8"
},
"Links": null,
"Aliases": [
"f53643ac5f9b"
],
"NetworkID": "6um0tpqyj5pkl12xzklmt7vdv",
"EndpointID": "20a9ac122ba2cdcda5827b2d54688426d1df0dafa20afa70bf8f65b387d07b77",
"Gateway": "",
"IPAddress": "10.255.0.8",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:0a:ff:00:08"
}
}
}
}
]
最佳答案
这可能是因为您正在运行一个 docker swarm 堆栈,它对运行的节点数量进行负载平衡。尝试通过以下方式取下堆栈:
docker stack rm getstartedlab
正如他们在网站上所建议的那样。
关于python - docker 容器在停止或删除后启动新容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45401420/
我正在使用以下dockerfile: FROM ubuntu:14.04 MAINTAINER xxx xxx # SSH RUN apt-get update && apt-get install
我运行了docker-compose build celery,(经过数小时的尝试,我的连接不良)成功了。 app Dockerfile的前80%是相同的,但不会重复使用缓存。从我可以浏览的内容来看,
我可以使用以下命令成功创建 Docker 注册表 v2 服务:docker service create 然后我使用 docker Push 将一些图像推送到该服务。 当我通过 curl localh
我正在尝试使用 gitlab 构建 CI,我从 docker 的 docker 镜像开始,我的前端存储库没有任何问题,但现在使用相同的 gitlab-ci 配置文件,我有此守护程序错误。 这是构建的输
用例: 我们在 Jenkins 中有几个“发布作业”build 和 push 应用程序的 Docker 镜像到 docker registry,更新各种文件中的项目版本,最后将发布标签推送到相应的 G
当我尝试构建我的 docker 文件时,docker 返回以下错误: [+] Building 0.0s (1/2)
docker-in-docker 的作者在此博客中建议不要将此图像用于 CI 目的: jpetazzo/Using Docker-in-Docker for your CI or testing en
我创建了一个 Dockerfile 来在 Docker 中运行 Docker: FROM ubuntu:16.04 RUN apt-get update && \ apt-get in
我尝试为 Docker 镜像定位一个特定标签。我怎样才能在命令行上做到这一点?我想避免下载所有图像,然后删除不需要的图像。 在 Ubuntu 官方版本中,https://registry.hub.do
我正在尝试在docker中运行docker。唯一的目的是实验性的,我绝不尝试实现任何功能,我只想检查docker从另一个docker运行时的性能。 我通过Mac上的boot2docker启动docke
docker-compose.yml version: "3" services: daggr: image: "docker.pvt.com/test/daggr:stable"
我有一个非常具体的开发环境用例。在一些代码中,我启动了一个容器来抓取页面并检索在容器中运行的服务(Gitlab)的 token 。 现在,我希望 Dockerize 运行它的代码。具体来说,类似: o
之前已经问过这个问题,但我不确定当时是否可以使用docker-compose文件完成docker堆栈部署。 由于最新版本支持使用compose将服务部署到堆栈,因此,我无法理解dab文件的值。 我检查
我在一次采访中被问到这个问题,但无法回答。也没有找到任何相关信息。 最佳答案 正如 Docker 文档中所述,Docker 注册表是: [...] a hosted service containin
有没有一种方法可以将具有给定扩展名的所有文件复制到Docker中的主机?就像是 docker cp container_name:path/to/file/in/docker/*.png path/o
我的日志驱动程序设置为journald。使用日志记录驱动程序时,daemon.json文件中的日志级别配置会影响日志吗?使用docker logs 时仅会影响容器日志? 例如,docker和journ
我最近开始使用Docker + Celery。我还共享了full sample codes for this example on github,以下是其中的一些代码段,以帮助解释我的观点。 就上下文
运行docker build .命令后,尝试提交构建的镜像,但收到以下错误 Step 12 : CMD activator run ---> Using cache ---> efc82ff1ca
我们有docker-compose.yml,其中包含Kafka,zookeeper和schema registry的配置 当我们启动docker compose时,出现以下错误 docker-comp
我是Docker的新手。是否可以在Docker Hub外部建立Docker基本镜像存储库?假设将它们存储在您的云中,而不是拥有DH帐户?谢谢。 最佳答案 您可以根据需要托管自己的注册表。可以在Depl
我是一名优秀的程序员,十分优秀!