Akita Credentials in a Volume

You might want to specify your Akita credentials by mounting a directory to your Docker container. This is a more secure method than specifying them on the command line or as environment variables.

The method we will walk through here can be used with any of our other Docker instructions.

To mount the directory containing your Akita credentials into the container, you can either:

  1. Use a flag on the command line, or
  2. Use --env-file

Command Line Flag

Mount the directory containing your Akita credentials via a flag on the Docker command line:

docker run ... \
  --volume ~/.akita/credentials.yaml:/root/.akita/credentials.yaml:ro 
  ...

This takes your current user's credentials.yaml file and makes it a directory that is then mapped, created by akita login, into the container.

env file Argument

Alternatively, you can use Docker's --env-file argument to specify environment variables in a file instead of on the command line.