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

Can not use grepplabs/kafka-proxy ARM image as base image #163

Open
stefan-te opened this issue Mar 22, 2024 · 1 comment
Open

Can not use grepplabs/kafka-proxy ARM image as base image #163

stefan-te opened this issue Mar 22, 2024 · 1 comment

Comments

@stefan-te
Copy link

Hi,

we are using the grepplabs/kafka-proxy image as base image for our own docker image. We were building on amd64 architecture before but want to switch to arm now which leads to errors now. We build our image in AWS CodePipeline and get the following error there:

#6 [2/4] RUN apk update && apk --no-cache add openssl coreutils
#6 0.594 exec /bin/sh: exec format error
#6 ERROR: process "/bin/sh -c apk update && apk --no-cache add openssl coreutils" did not complete successfully: exit code: 1
------
 > [2/4] RUN apk update && apk --no-cache add openssl coreutils:
0.594 exec /bin/sh: exec format error
------
Dockerfile:11
--------------------
   9 |     ENV HTTP_PROXY=$arg_http_proxy
  10 |     
  11 | >>> RUN apk update && apk --no-cache add openssl coreutils
  12 |     
  13 |     ADD ./start.sh ./
--------------------
ERROR: failed to solve: process "/bin/sh -c apk update && apk --no-cache add openssl coreutils" did not complete successfully: exit code: 1

Our Dockerfile looks like this:

FROM --platform=linux/arm64 grepplabs/kafka-proxy@sha256:b73d462d13d49f6281810f5ef481b6aac152193d9fc30913bc512c4977ad1a8b

USER root

ARG arg_https_proxy
ARG arg_http_proxy

ENV HTTPS_PROXY=$arg_https_proxy
ENV HTTP_PROXY=$arg_http_proxy

RUN apk update && apk --no-cache add openssl coreutils

ADD ./start.sh ./
RUN chmod +x ./start.sh

ENTRYPOINT ["/bin/sh", "start.sh"]

So even while we are specifically pull the kafka-proxy ARM image it seems that there are issues with the architecture if you search for this error message.

Locally on an Mac with ARM processor docker build is successful but we noticed that the apk installs from the amd64 repository:

#6 [2/4] RUN apk update && apk --no-cache add openssl coreutils
#6 0.130 fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
#6 0.405 fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz

So we assume that the alpine base image that is used is somehow not from arm architecture.

Does anyone have an idea how to fix this?

@Andreas54321
Copy link

This is working when updating the kafka-proxy Dockerfile to:

FROM --platform=$BUILDPLATFORM alpine:3.19

Please update the base image :-)
Thanks!

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

No branches or pull requests

2 participants