无法连接到 Vault Web UI。我使用 docker-compose 创建 Vault 容器。尝试使用 ip 地址从另一台机器连接,但出现错误:
ERR_CONNECTION_REFUSED
码头工人-compose.yml:
version: '2'
services:
vault:
image: vault
container_name: vault
ports:
- "8200:8200"
environment:
- VAULT_ADDR=http://127.0.0.1:8200
- VAULT_API_ADDR=http://127.0.0.1:8200
restart: always
volumes:
- /var/lib/vault/volumes/logs:/vault/logs
- /var/lib/vault/volumes/file:/vault/file
- /var/lib/vault/volumes/config:/vault/config
cap_add:
- IPC_LOCK
entrypoint: vault server -config=/vault/config/vault.hcl`
Vault.hcl:
ui = true
storage "file" {
path = "/var/lib/vault/data"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = "true"
}