Skip to content

docker: Avoid specifying TARGETARCH for await#5835

Merged
kleimkuhler merged 1 commit intomainfrom
ver/arm-await
Feb 26, 2021
Merged

docker: Avoid specifying TARGETARCH for await#5835
kleimkuhler merged 1 commit intomainfrom
ver/arm-await

Conversation

@olix0r
Copy link
Member

@olix0r olix0r commented Feb 26, 2021

When introducing the linkerd-await helper, we provided a default value
for TARGETARCH. This appears to interfere with multi-arch image
builds, causing ARM builds to fetch amd64 binaries.

Unsetting this default appears to fix this issue.

When introducing the `linkerd-await` helper, we provided a default value
for `TARGETARCH`. This appears to interfere with multi-arch image
builds, causing ARM builds to fetch amd64 binaries.

Unsetting this default appears to fix this issue.
@olix0r olix0r requested a review from a team as a code owner February 26, 2021 02:56
@olix0r
Copy link
Member Author

olix0r commented Feb 26, 2021

confirmed locally via

:; docker buildx build  --platform arm64 . -f controller/Dockerfile --load --progress plain --no-cache
...
#8 [await 3/3] RUN curl -fsSvLo linkerd-await https://github.com/olix0r/linkerd-await/releases/download/release%2Fv0.2.1/linkerd-await-v0.2.1-arm64 && chmod +x linkerd-await

we're at least fetching the correct binary now.. so I'd expect it to work


and confirmed that this is not the behavior on main, where we see:

#8 [await 3/3] RUN curl -fsSvLo linkerd-await https://github.com/olix0r/linkerd-await/releases/download/release%2Fv0.2.1/linkerd-await-v0.2.1-amd64 && chmod +x linkerd-await

Copy link
Contributor

@Pothulapati Pothulapati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and makes sense as now we seems to use the global TARGETARCH and not overriding it.

Copy link
Contributor

@kleimkuhler kleimkuhler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this makes sense 👍

@kleimkuhler kleimkuhler merged commit ab2a809 into main Feb 26, 2021
@kleimkuhler kleimkuhler deleted the ver/arm-await branch February 26, 2021 12:30
alpeb added a commit that referenced this pull request Mar 8, 2021
With #5835 adding `linkerd-await` in most Dockerfiles we require
`TARGETARCH` to be set by the system, which is only available in the
BuildKit backend. Thus we drop support for plain vanilla docker and
remove all references to `DOCKER_BUILDKIT`. The developer docs are being
updated accordingly in #5869
@alpeb alpeb mentioned this pull request Mar 8, 2021
alpeb added a commit that referenced this pull request Mar 9, 2021
With #5835 adding `linkerd-await` in most Dockerfiles we require
`TARGETARCH` to be set by the system, which is only available in the
BuildKit backend. Thus we drop support for plain vanilla docker and
remove all references to `DOCKER_BUILDKIT`. The developer docs are being
updated accordingly in #5869
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Mar 23, 2021
When introducing the `linkerd-await` helper, we provided a default value
for `TARGETARCH`. This appears to interfere with multi-arch image
builds, causing ARM builds to fetch amd64 binaries.

Unsetting this default appears to fix this issue.

Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Mar 23, 2021
With linkerd#5835 adding `linkerd-await` in most Dockerfiles we require
`TARGETARCH` to be set by the system, which is only available in the
BuildKit backend. Thus we drop support for plain vanilla docker and
remove all references to `DOCKER_BUILDKIT`. The developer docs are being
updated accordingly in linkerd#5869

Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Apr 21, 2021
When introducing the `linkerd-await` helper, we provided a default value
for `TARGETARCH`. This appears to interfere with multi-arch image
builds, causing ARM builds to fetch amd64 binaries.

Unsetting this default appears to fix this issue.

Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Apr 21, 2021
With linkerd#5835 adding `linkerd-await` in most Dockerfiles we require
`TARGETARCH` to be set by the system, which is only available in the
BuildKit backend. Thus we drop support for plain vanilla docker and
remove all references to `DOCKER_BUILDKIT`. The developer docs are being
updated accordingly in linkerd#5869

Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants