Skip to content

Commit c71cf6a

Browse files
GameXGGameXG
authored andcommitted
修正 compose 例子错误
数据卷相对路径必须以 . 或 .. 开头,否则会被认为是卷名称,由于存在 “/” 会提示:ERROR: haproxy/haproxy.cfg includes invalid characters for a local volume name, only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed 参考来源:https://docs.docker.com/compose/compose-file/ You can mount a relative path on the host, which will expand relative to the directory of the Compose configuration file being used. Relative paths should always begin with . or ...
1 parent 062f008 commit c71cf6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compose/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ webc:
164164
haproxy:
165165
image: haproxy:latest
166166
volumes:
167-
- haproxy:/haproxy-override
168-
- haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
167+
- ./haproxy:/haproxy-override
168+
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
169169
links:
170170
- weba
171171
- webb

0 commit comments

Comments
 (0)