Hi, I've been tearing my hair out trying to figure why I keep getting these errors.
The odd this is, if I use the same configuration and pass it in via the command line using VAULT_LOCAL_CONFIG then everything works!
NOTE: This is without having a config.hcl file in /vault/config
This is an example of me passing in the config
docker run --cap-add=IPC_LOCK -e 'VAULT_LOCAL_CONFIG={"storage":{"postgresql":{"connection_url":"postgres://vault:examplePwd@host.docker.internal:5432/hc-vault?sslmode=disable"}}, "listener": [{"tcp": { "address": "0.0.0.0:8200", "tls_cert_file": "/vault/config/certs/vault.crt", "tls_key_file": "/vault/config/certs/vault.key"}}], "default_lease_ttl": "168h", "max_lease_ttl": "720h", "ui": true}' --network acuk-net --name vault-server -v ~/vault/config:/vault/config -p 8200:8200 hashicorp/vault server
This gives the following output
However, if I try to spin up the container using the following config file
using the following docker run command
`docker run --cap-add=IPC_LOCK -p 8200:8200 -v ~/vault/config:/vault/config --network acuk-net --name vault-server hashicorp/vault server -config=/vault/config/config.hcl
I get this????
Can't figure out what I'm doing wrong!!
It's defo not a port issue, because the first method of spinning up the container works just fine...
The super weird thing is, if I use the config file (above) this way, it works!!
docker run --cap-add=IPC_LOCK -e 'VAULT_LOCAL_CONFIG={"default_lease_ttl": "168h", "max_lease_ttl": "720h", "ui": true}' --network acuk-net --name vault-server -v ~/vault/config:/vault/config -p 8200:8200 hashicorp/vault server
Hi, I've been tearing my hair out trying to figure why I keep getting these errors.
The odd this is, if I use the same configuration and pass it in via the command line using
VAULT_LOCAL_CONFIG
then everything works!NOTE: This is without having a config.hcl file in /vault/config
This is an example of me passing in the config
docker run --cap-add=IPC_LOCK -e 'VAULT_LOCAL_CONFIG={"storage":{"postgresql":{"connection_url":"postgres://vault:examplePwd@host.docker.internal:5432/hc-vault?sslmode=disable"}}, "listener": [{"tcp": { "address": "0.0.0.0:8200", "tls_cert_file": "/vault/config/certs/vault.crt", "tls_key_file": "/vault/config/certs/vault.key"}}], "default_lease_ttl": "168h", "max_lease_ttl": "720h", "ui": true}' --network acuk-net --name vault-server -v ~/vault/config:/vault/config -p 8200:8200 hashicorp/vault server
This gives the following output![image](https://user-images.githubusercontent.com/3491517/232234035-edf58596-1db3-4a19-879f-028db93c7c8a.png)
However, if I try to spin up the container using the following config file
using the following docker run command `docker run --cap-add=IPC_LOCK -p 8200:8200 -v ~/vault/config:/vault/config --network acuk-net --name vault-server hashicorp/vault server -config=/vault/config/config.hcl
I get this????![image](https://user-images.githubusercontent.com/3491517/232235109-370b8665-9d11-41bc-9e1a-9c6f94bf8b9a.png)
Can't figure out what I'm doing wrong!!
It's defo not a port issue, because the first method of spinning up the container works just fine...
The super weird thing is, if I use the config file (above) this way, it works!!
docker run --cap-add=IPC_LOCK -e 'VAULT_LOCAL_CONFIG={"default_lease_ttl": "168h", "max_lease_ttl": "720h", "ui": true}' --network acuk-net --name vault-server -v ~/vault/config:/vault/config -p 8200:8200 hashicorp/vault server