bazelbuild / bazelbuild/rules_docker

Can't build containers on macOS after upgrade to 0.23.0

Open
#2,009 10 comments 16 reactions 0 assignees View on GitHub
Can Close?
Dominant language
Starlark
Stars
1.1k
Forks
689
PR merge metrics
No merged PRs in 30d

Description

# 🐞 bug report

### Affected Rule

The issue is caused by the rule: `java_image`

### Is this a regression?

Yes, the previous version in which this bug was not present was: 0.22.0

### Description

When building a simple Java Docker image on macOS, the build fails with “No matching toolchains found”. It works on Linux, since the target and host platforms are identical.

## 🔬 Minimal Reproduction

See https://github.com/eikemeier/java-container

## 🔥 Exception or Error



bazel build //src/main/java/com/example/hello_world:hello_world_image
[...]
ERROR: [...]/java-container/src/main/java/com/example/hello_world/BUILD:16:11: While resolving toolchains for target //src/main/java/com/example/hello_world:hello_world_image.binary: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. [...]

## 🌍 Your Environment

**Operating System:**

  

macOS Catalina 10.15.7

**Output of `bazel version`:**

  

5.0.0

**Rules_docker version:**

  

0.23.0

**Anything else relevant?**

See also https://github.com/bazelbuild/rules_docker/issues/1988#issuecomment-1016465174

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.