hashicorp / docker-vault

Official Docker images for Vault
Mozilla Public License 2.0
500 stars 223 forks source link

UUID for vault user #312

Open nax71 opened 1 year ago

nax71 commented 1 year ago

The vault user is uuid in the container docker file is 100.

It is better to can parameter this.

For instance on OCI Oracle cloud uuid 100 is dedicated to systemd-network:x:100:102:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin

Due to this the vault created bellongs to systemd-network which is wired.

thanos1983 commented 1 year ago

I was about to raise the same issue. If possible can the community update the image to use ENVIRONMENT Variable for UID / GID so we can overwrite on startup.

Joffrey54 commented 10 months ago

You can overwrite. Exemple for an agent for my Prometheus docker service:

docker run -d --name vault-agent -u $(id -u nobody):$(id -g nobody) -p 18202:8200  --rm -e SKIP_SETCAP=true \
  --volume /root/vault-agent:/vault-agent:ro \
  --volume /root/prometheus/vault-agent:/vault-prometheus:rw \
  --volume /etc/ssl/certs:/etc/ssl/certs \
  --entrypoint vault \
  hashicorp/vault agent -config=/vault-agent/vault-agent-prometheus.hcl