![:守护进程的错误响应:无效的容器名称('activemq'),只允许[a-zA-Z0-9]](https://linux22.com/image/785221/%EF%BC%9A%E5%AE%88%E6%8A%A4%E8%BF%9B%E7%A8%8B%E7%9A%84%E9%94%99%E8%AF%AF%E5%93%8D%E5%BA%94%EF%BC%9A%E6%97%A0%E6%95%88%E7%9A%84%E5%AE%B9%E5%99%A8%E5%90%8D%E7%A7%B0%EF%BC%88'activemq'%EF%BC%89%EF%BC%8C%E5%8F%AA%E5%85%81%E8%AE%B8%5Ba-zA-Z0-9%5D.png)
在 Windows 上运行 Docker 桌面。
docker run --name='activemq' -it --rm -P webcenter/activemq:latest
docker: Error response from daemon: Invalid container name ('activemq'), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed.
See 'docker run --help'.
如您所见,“activemq”符合允许的掩码。可能是什么原因呢?我被迫在没有明确设置名称的情况下运行它。
Docker 详细信息如下:
docker version
Client:
Cloud integration: v1.0.31
Version: 20.10.23
API version: 1.41
Go version: go1.18.10
Git commit: 7155243
Built: Thu Jan 19 17:43:10 2023
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Desktop 4.17.0 (99724)
Engine:
Version: 20.10.23
API version: 1.41 (minimum version 1.12)
Go version: go1.18.10
Git commit: 6051f14
Built: Thu Jan 19 17:32:04 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
答案1
您正在运行带有奇怪 shell 的 Windows。请尝试删除毫无用处的单引号。