Skip to content

Cannot build docker image #192

Closed
Closed
@shouichi

Description

@shouichi

Step to reproduce

$ docker build -t copybara .                                                    
Sending build context to Docker daemon  18.48MB
Step 1/15 : FROM l.gcr.io/google/bazel:latest AS build
 ---> 5cac8433a9d7
Step 2/15 : WORKDIR /usr/src/copybara
 ---> Using cache
 ---> 00085dbf43a2
Step 3/15 : COPY . .
 ---> dbdf702f1c0a
Step 4/15 : RUN bazel build //java/com/google/copybara:copybara_deploy.jar     && mkdir -p /tmp/copybara     && cp bazel-bin/java/com/google/copybara/copybara_deploy.jar /tmp/copybara/
 ---> Running in 63e1f886f82a
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (1 packages loaded, 0 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (8 packages loaded, 6 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (9 packages loaded, 6 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (9 packages loaded, 6 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (9 packages loaded, 6 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (9 packages loaded, 6 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (45 packages loaded, 749 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (45 packages loaded, 749 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (45 packages loaded, 749 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (46 packages loaded, 859 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (46 packages loaded, 859 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (47 packages loaded, 899 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (55 packages loaded, 1068 targets configured)
Analyzing: target //java/com/google/copybara:copybara_deploy.jar (55 packages loaded, 1068 targets configured)
INFO: Analyzed target //java/com/google/copybara:copybara_deploy.jar (56 packages loaded, 1194 targets configured).
INFO: Found 1 target...
[0 / 137] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[75 / 160] Building third_party/bazel/libshell.jar (17 source files); 1s worker ... (8 actions running)
ERROR: /usr/src/copybara/java/com/google/copybara/profiler/BUILD:19:13: Building java/com/google/copybara/profiler/libprofiler.jar (6 source files) failed (Exit 1)
java/com/google/copybara/profiler/LogProfilerListener.java:36: error: cannot find symbol
    StackWalker.getInstance()
    ^
  symbol:   variable StackWalker
  location: class LogProfilerListener
Target //java/com/google/copybara:copybara_deploy.jar failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 46.103s, Critical Path: 8.40s
INFO: 87 processes: 71 processwrapper-sandbox, 16 worker.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
The command '/bin/sh -c bazel build //java/com/google/copybara:copybara_deploy.jar     && mkdir -p /tmp/copybara     && cp bazel-bin/java/com/google/copybara/copybara_deploy.jar /tmp/copybara/' returned a non-zero code: 1

The problem seems to be the java version. The base image's (l.gcr.io/google/bazel) version is 8 but the minimum required version is 11.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions