Giter VIP home page Giter VIP logo

go-bazel-gazelle-docker-template's Introduction

Demo Repo Reproducing a Bug in io_bazel_rules_docker

This repo is a minimal example demonstrating a bug in io_bazel_rules_docker that prevents go_image from targeting arm64 on an M1 MacBook.

If you run the echo_image, you get the warning stating that the requested image's platform is amd64 instead of the expected arm64:

$ bazel run //go/echo:echo_image
INFO: Analyzed target //go/echo:echo_image (27 packages loaded, 851 targets configured).
INFO: Found 1 target...
Target //go/echo:echo_image up-to-date:
  bazel-out/darwin_arm64-fastbuild-ST-4a519fd6d3e4/bin/go/echo/echo_image-layer.tar
INFO: Elapsed time: 1.550s, Critical Path: 0.11s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
Loaded image ID: sha256:3650e8533d18cdecc09475b7de489dc60213bb970fb97de3d9086308bd6311ba
Tagging 3650e8533d18cdecc09475b7de489dc60213bb970fb97de3d9086308bd6311ba as bazel/go/echo:echo_image
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

The fix is to add an architecture flag which was done in this PR.

Usage

$ bazel run --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //go/echo:echo_image

go-bazel-gazelle-docker-template's People

Contributors

sfc-gh-shsharma avatar shadanan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.