- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 637
Open
Labels
Description
Bug report
Failing to install java when sdkman is install in a custom directory in a Dockerfile.
To reproduce
Run docker build --format docker . of the following Dockerfile
FROM ubuntu:noble
# Comment out ENV to make it work
ENV SDKMAN_DIR ./build-out/sdkman
RUN apt update && \
    apt install -y ca-certificates curl bash unzip zip tar sed
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN \
    curl -o- "https://get.sdkman.io" | bash && \
    source "${SDKMAN_DIR:-/root/.sdkman}/bin/sdkman-init.sh" && \
    sdk install java 21.0.7-zulu
Failing with error
zip I/O error: No such file or directory
zip error: Could not create output file (./build-out/sdkman/tmp/java-21.0.7-zulu.zip)
Done repackaging...
Stop! The archive was corrupt and has been removed! Please try installing again.
Content of the folder ./build-out/sdkman/tmp after sdk install java 21.0.7-zulu failed
./build-out/sdkman/tmp
|-- hook_post_java_21.0.7-zulu.sh
`-- java-21.0.7-zulu.headers.tmp
System info
OS: MacOS via podman. Same error is happening in GitlabCI when running in ubuntu:nobel image.
Bash: GNU bash, version 5.2.21(1)-release (aarch64-unknown-linux-gnu)
SDK: SDKMAN!
script: 5.19.0
native: 0.7.4 (linux aarch64)