🐳Run with Docker

How to use Identifo Docker image

Running in stateless mode

The simplest way to get acquainted with Identifo is to run the official Docker image:

docker run -p 8081:8081 madappgangd/identifo:latest 

This command launches Identifo with default settings and allows you to access:

Preserving state across container restarts

To introduce state to the above setup, Docker bind mounts or Docker volumes can be used for either configuration or application data, or both; Identifo also allows for using AWS S3 a persistent configuration storage.

Preserving configuration changes

The simplest way to introduce state is to create a folder on the host machine, place a config file there and bind mount it to the Docker container. You can download the default config file from the Identifo repository and use it as is:

mkdir data #create a directory for Identifo data 
curl -o data/config.yaml https://raw.githubusercontent.com/MadAppGang/identifo/master/cmd/config-boltdb.yaml

Now run the image specifying a mount:

This way, all the updates made to configuration will be reflected in the data/config.yaml file on your host machine.

--config flag also accepts S3 prefixes as a valid config file location:

Preserving users and applications

Default Identifo configuration uses BoltDB as a persistent storage for application data, with database file located under /data folder. Similar to the example with preserving configuration changes, to make application data survive container restarts, you can either mount the /data folder from the host filesystem, or create a Docker volume.

Use the following command to create and use a Docker-managed volume called identifo-data:

To get the details about this volume: docker volume inspect identifo-data.

To delete the volume: docker volume rm identifo-data.

Another option is to mount a host's folder when running the Docker image:

This command will use ./data directory on your host filesystem as a /data folder in Docker container filesystem. Just ensure the directory exists on your host machine, Docker will not create it for you.

Last updated

Was this helpful?