Unknown plugin type failed to load plugin as database
geoangelotti opened this issue · 1 comments
When trying to run the secrets_mock plugin inside a docker, I am getting the following issue:
failed to load plugin as database v5: fork/exec /plugins/vault-plugin-secrets-mock: no such file or directory
.
The build process can be seen in this action.
Way to reproduce:
- Plugin built outside the container (
make build
,sudo setcap cap_ipc_lock=+ep ...
) - Run the container:
docker run -d --name notary -p 8200:8200 -v $(pwd)/vault/plugins:/plugins \
-e 'VAULT_ADDR=http://127.0.0.1:8200' -e 'VAULT_DEV_ROOT_TOKEN_ID=root' -e 'VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200' --cap-add=IPC_LOCK \
$1 sh -c "vault server -dev -dev-root-token-id=root -dev-plugin-dir=/plugins"
The error message says that there is no file or directory at the plugin path but there is.
Hi @geoangelotti, I wonder if this is the same issue I've been seeing. Looks like the issue is related to the alpine base: https://fukubaka0825.medium.com/how-to-resolve-the-trouble-occurred-when-i-install-go-into-the-alpine-image-3c1e84f2315a
I worked around the issue on my side by re-building the plugin inside the container (I guess creating a temporary alpine container just for the build would also work), but maybe using a different base OS for the vault container would be useful as I imagine lots of plugins will have this problem!