[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
haproxy latest e4e1b2695b0b 10 days ago 69.5 MB
[root@localhost ~]# docker run ‐it ‐d ‐p 4001:8888 ‐p 4002:3306 ‐v /home/soft/haproxy:/usr/local/etc/haproxy ‐‐name h1 ‐‐privileged ‐‐net=net1 ‐‐ip 172.18.0.7 haproxy
/usr/bin/docker-current: Error parsing reference: "‐it" is not a valid repository/tag: invalid reference format.
See '/usr/bin/docker-current run --help'.
[root@localhost ~]# docker run ‐it ‐d ‐p 4001:8888 ‐p 4002:3306 ‐v /home/soft/haproxy:/usr/local/etc/haproxy ‐‐name h1 ‐‐privileged ‐‐net=net1 ‐‐ip 172.18.0.7 e4e1b2695b0b
/usr/bin/docker-current: Error parsing reference: "‐it" is not a valid repository/tag: invalid reference format.
See '/usr/bin/docker-current run --help'.
我不明白有什么问题。是否有无效命令?如果只是“docker run-it haproxy bash”就可以了
并使用图像id或haproxy:latest also 有此错误
有人知道原因吗
1条答案
按热度按时间eagi6jfj1#
看起来您可能是从转换了常规ascii的某个地方复制粘贴了此代码
-
变成unicode连字符(https://www.fileformat.info/info/unicode/char/2010/index.htm)它们看起来貌似相似,但docker不会与后者合作。