Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Windows from different drive than C:\ #427

Open
malkia opened this issue Dec 1, 2023 · 0 comments
Open

Running on Windows from different drive than C:\ #427

malkia opened this issue Dec 1, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@malkia
Copy link

malkia commented Dec 1, 2023

(Copied verbatim from https://github.com/malkia/oci/tree/ec07528e1bf01c23650aa2f9915c2c102cffb986)

  • Running from drive different than your %USERPROFILE% one (typically C:), for example on D:\ would try to read \Users\<username>\.docker\config.json (I've replaced my username with <username> below)

      ERROR: <builtin>: fetching oci_alias rule //:rules_oci~1.4.3~oci~distroless_base: Traceback (most recent call last):
              File "C:/users/<username>/_bazel_<username>/roe7hhvn/external/rules_oci~1.4.3/oci/private/pull.bzl", line 472, column 36, in _oci_alias_impl
                      downloader = _create_downloader(rctx)
              File "C:/users/<username>/_bazel_<username>/roe7hhvn/external/rules_oci~1.4.3/oci/private/pull.bzl", line 318, column 40, in _create_downloader
                      "config": _get_auth_config_path(rctx),
              File "C:/users/<username>/_bazel_<username>/roe7hhvn/external/rules_oci~1.4.3/oci/private/pull.bzl", line 312, column 37, in _get_auth_config_path
                      return json.decode(rctx.read(path))
      Error in read: java.io.FileNotFoundException: \Users\<username>\.docker\config.json (The system cannot find the path specified)
      ERROR: java.io.FileNotFoundException: \Users\<username>\.docker\config.json (The system cannot find the path specified)
    
  • Workaround

    • Not best workaround, but setting DOCKER_CONFIG to some value in .bazelrc "fixes" this

      common --repo_env=DOCKER_CONFIG=does_not_matter
      
    • It reports now:

      WARNING: Could not find the `$HOME/.docker/config.json` and `$XDG_RUNTIME_DIR/containers/auth.json` file. Running one of `podman login`, `docker login`, `crane login` may help.
      
@thesayyn thesayyn added bug Something isn't working help wanted Extra attention is needed labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants