Sign inSign up

bjwschaap/vault

By bjwschaap

Updated about 10 years ago

A minimal Alpine Linux Docker container for running Hashicorp Vault

Image
0

1.0K

bjwschaap/vault repository overview

Docker Repository on Quay

docker-vault

A minimal Alpine Linux container to run Hashicorp Vault. This image takes the Vault version provided by Alpine package management.

Run from Docker Hub

You can run this image directly from Docker hub. This image does not include a default configuration for vault, so you need to mount it yourself as a volume. An example vault.hcl file is included in the Github repo.

In this example I made an explicit port mapping, but obviously you could automap (-P) as well.

Out of the box Vault needs to be able to do some memory paging which is not allowed in Docker by default. This is why we need the -cap-add IPC_LOCK (also see this issue). If you don't want to provide the container this capacity you can disable Vault from using this feature by configuring disable_mlock = true (see: configuration guide), however this is not recommended in production.

docker run -d -p 8200:8200 -v $(pwd)/vault.hcl:/etc/vault.hcl --cap-add IPC_LOCK --name vault bjwschaap/vault

Build from source

Clone the repo:

git clone https://github.com/bjwschaap/docker-vault.git
cd docker-vault

Build the image:

docker build -t [yourname]/vault .

And run it:

docker run -d -p 8200:8200 -v $(pwd)/vault.hcl:/etc/vault.hcl --cap-add IPC_LOCK --name vault [yourname]/vault
Using Vault

I will not document how to use Vault, since very good documentation is provided by Hashicorp on the Vault website. This is a good starting point.

Contributing

Contributions are always welcome! Just file an issue on Github and create a pull request.

Tag summary

Content type

Image

Digest

Size

13.6 MB

Last updated

about 10 years ago

docker pull bjwschaap/vault