bottlerocket-os / bottlerocket-os/bottlerocket-update-operator

Native builder required for targeting different ARCH

Open
#42 4 comments 0 reactions 0 assignees View on GitHub
priority/p1 type/bug
Dominant language
Rust
Stars
220
Forks
50
PR merge metrics
No merged PRs in 30d

Description

**Image I'm using:**

n/a

**Issue and Feature Request:**

The build process is unable to produce an `arm64v8` architecture specific image. The build's `Dockerfile` uses a `scratch` based container image and, on my machine at least, the *requested* architecture is not set for this image (with `ARCH=arm64`).

`docker build` uses the *native* architecture for `scratch` and [does not support setting platform in builder](https://github.com/moby/moby/issues/32487). Using [Docker's `buildx`](https://github.com/docker/buildx) works when setting platform at the top of the build:

```
docker buildx build --platform linux/arm64 ... # existing arguments
```

However, this would require users to install the `buildx` plugin and isn't a reasonable ask.

This issue should define a solution towards a correctly building a non-native architecture targeted image OR take steps to set the image's correct architecture at/following build.

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.