Skip to content

Invalid config file paths in Docker documentation #1254

@ciakval

Description

@ciakval

Steps To Reproduce

Prerequisites

  1. Create an Machine Account on non-default server (e.g. https://vault.bitwarden.eu) and create an Access Token
  2. Set up the server in a local config file (e.g. bws config server-base https://vault.bitwarden.eu)
  3. Go to https://bitwarden.com/help/secrets-manager-cli/#config-docker and follow the steps ( docker run -it -v /PATH/TO/YOUR/CONFIGFILE:/home/app/.bws/config -e BWS_ACCESS_TOKEN=<ACCESS_TOKEN_VALUE> bitwarden/bws secret list )
  4. Observe that the configuration was not applied

Expected Result

Values from configuration file are used (e.g. the command succeeds)

Actual Result

Configuration file is not seen by the bws run in Docker.

The following error is displayed:

Warning: Permission denied (os error 13)
Retrieving the state file failed. Attempting to continue without using state. Please set "state_dir" in your config file to avoid authentication limits.

Screenshots or Videos

No response

Additional Context

This can be fixed by using the correct path inside the Docker container for the configuration file.

The correct path is: /home/app/.config/bws/config instead of /home/app/.bws/config.

Running:

docker run --rm -it -v "$HOME/.config/bws:/home/app/.config/bws" <other parameters>

produces the desired result and provides even the state_dir to the bws in Docker.

Operating System

Linux

Operating System Version

No response

Shell

Bash

Build Version

..

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions