Public | Automated Build

Last pushed: 2 years ago
Short Description
A minimal Alpine Linux Docker container for running Hashicorp Vault
Full Description


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
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


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

Docker Pull Command
Source Repository