Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default build-image target arch to amd64 #11148

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions loki-build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Install helm (https://helm.sh/) and helm-docs (https://github.com/norwoodj/helm-docs) for generating Helm Chart reference.
FROM golang:1.21.3-bullseye as helm
ARG TARGETARCH
ARG TARGETARCH="amd64"
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be set by DOCKER_BUILDKIT: 1 which I would favour.

Copy link
Collaborator Author

@trevorwhitney trevorwhitney Nov 6, 2023

Choose a reason for hiding this comment

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

I'm confused on how this is supposed to work. The Makefile already sets DOCKER_BUILDKIT=1, but running make build-image fails. However, if I run DOCKER_BUILDKIT=1 make build-image it works as you have mentioned.

I just want make build-image to work, I don't care how we get there.

ARG HELM_VER="v3.2.3"
RUN curl -L "https://get.helm.sh/helm-${HELM_VER}-linux-$TARGETARCH.tar.gz" | tar zx && \
install -t /usr/local/bin "linux-$TARGETARCH/helm"
Expand All @@ -16,7 +16,7 @@ RUN BIN=$([ "$TARGETARCH" = "arm64" ] && echo "helm-docs_Linux_arm64" || echo "h
install -t /usr/local/bin helm-docs

FROM alpine:3.18.4 as lychee
ARG TARGETARCH
ARG TARGETARCH="amd64"
ARG LYCHEE_VER="0.7.0"
RUN apk add --no-cache curl && \
curl -L -o /tmp/lychee-$LYCHEE_VER.tgz https://github.com/lycheeverse/lychee/releases/download/${LYCHEE_VER}/lychee-${LYCHEE_VER}-x86_64-unknown-linux-gnu.tar.gz && \
Expand All @@ -30,7 +30,7 @@ RUN apk add --no-cache curl && \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.1

FROM alpine:3.18.4 as buf
ARG TARGETOS
ARG TARGETOS="Linux"
RUN apk add --no-cache curl && \
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.4.0/buf-$TARGETOS-$(uname -m)" -o "/usr/bin/buf" && \
chmod +x "/usr/bin/buf"
Expand All @@ -39,7 +39,7 @@ FROM alpine:3.18.4 as docker
RUN apk add --no-cache docker-cli docker-cli-buildx

FROM golang:1.21.3-bullseye as drone
ARG TARGETARCH
ARG TARGETARCH="amd64"
RUN curl -L "https://github.com/drone/drone-cli/releases/download/v1.7.0/drone_linux_$TARGETARCH".tar.gz | tar zx && \
install -t /usr/local/bin drone

Expand Down
Loading