Installing openjdk in an addon Dockerfile gives error 1, works on PC

I’m developing an addon that runs Java code and I can’t get it to run on HASS on a RPi 3B+.

This is my Dockerfile:

ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8

# Install OpenJDK 17
RUN apk add openjdk17

# Copy data for add-on
ADD Release /Release
COPY run.sh /
RUN chmod a+x /run.sh

CMD [ "/run.sh" ]

If I try to install this addon on HASS it says that the “RUN apk add openjdk17” command exited with exit code 1, while if I try to build the Docker container on my PC (replacing the first two lines with “FROM alpine:latest”, which is the image that the docs say is used for HASS addons, it builds just fine.

What could be the issue?