Rules_docker: Version 0.14.4 have error

Created on 9 Jul 2020  ·  7Comments  ·  Source: bazelbuild/rules_docker

Hi, I found this error when using version 0.14.4 but fine for version 0.14.3

every rule of type _app_layer implicitly depends upon the target '@io_bazel_rules_docker//container:build_tar', but this target could not be found because of: error loading package '@io_bazel_rules_docker//container': Unable to find package for @pip_deps//:requirements.bzl: The repository '@pip_deps' could not be resolved.

Most helpful comment

I think you'll also need the following in your WORKSPACE after the container_deps (see here)

load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")

pip_deps()

I'll update the README

All 7 comments

@smukherj1 FYI, I think your update over here resulted in some unexpected breakage with this release:

https://github.com/bazelbuild/rules_docker/commit/770e67f629caa8dd28388247064525cb36ae0932#diff-5135d099cb06bd6b67cf9a4f68ea2d85R16

oh heck, I see @smukherj1 already addressed this in the discussion on that PR:

https://github.com/bazelbuild/rules_docker/pull/1535#issuecomment-655731965

@whilp I add the lines

load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")    

container_deps()

and got another error

no such package '@pip_deps_pypi__python_gflags_3_1_2//': The repository '@pip_deps_pypi__python_gflags_3_1_2' could not be resolved and referenced by '@io_bazel_rules_docker//container:build_tar_lib'

@henrywong-seekers yeah, I get a similar error (for six) — I’ve had container_deps in WORKSPACE. I started to set up a small repo to demonstrate the issue and hope to get back to this tomorrow, something seems not quite right.

For now, in case it’s helpful, this repo (and the GitHub actions status checks in it) show the general issue: https://github.com/whilp/world/pull/50

I think you'll also need the following in your WORKSPACE after the container_deps (see here)

load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")

pip_deps()

I'll update the README

@smukherj1 thanks, it's solves this issue ! 👏

Was this page helpful?
0 / 5 - 0 ratings