Closed kitingChris closed 2 years ago
I just rebuilt both 3.3.0 full and alpine and can't reproduce. Are you still able to reproduce the problem?
Error still occurs. But image gets built successfully. Looks strange any way
updates?
Hi,
I saw here (https://gitlab.alpinelinux.org/alpine/aports/-/issues/11221) that is bug in this alpine.
I changed to 'openjdk:8-alpine3.9' and solved for me.
Hope this helps.
And @newtmitch tks for the Dockerfile!
Thanks for the update, @rmsys . I might spend a little time on this over the holidays to clean up issues and what-not and I'll take a look at this issue as well and where it sits.
I just rebuilt images using openjdk;12-jdk-alpine
as the base image. The problem still persists there. If I change the base image to version openjdk;15-jdk-alpine
, the issue goes away. Prior to 15 the issue persists. It appears not to be anything other than annoying, so my thinking for now is to leave the jdk at 12 and let the issue remain for now. I don't fully understand the implications of taking the JDK too much further out beyond what Sonar even uses for their image. Any thoughts there?
@newtmitch had the same issue, was able to resolve by installing zip and unzip before unzipping the package, i.e.
FROM openjdk:15-jdk-alpine
ENV SONAR_SCANNER_VERSION 4.5.0.2216
COPY sonar-scanner-run.sh /usr/bin
ADD https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip /tmp/sonar-scanner.zip
WORKDIR /tmp
RUN apk add --no-cache zip unzip
RUN \
unzip /tmp/sonar-scanner.zip && \
mv -fv /tmp/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin/sonar-scanner /usr/bin && \
mv -fv /tmp/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/lib/* /usr/lib
...
@wambozi Installing zip/unzip worked for me as well, thanks! Putting some info here in case it helps others for the case I encountered.
I didn't have the same exact error as others above; my error was unzip: compressed symlink is not supported
,. This was probably triggered by the ASSEMBLY_EXCEPTION
file which is a symlink. There are at least 4 symlinks in the JRE, so ASSEMBLY_EXCEPTION
must have just been the first to trip unzip
up.
#8 6.240 inflating: sonar-scanner-4.5.0.2216-linux/jre/legal/jdk.jfr/ASSEMBLY_EXCEPTION
#8 6.240 unzip: compressed symlink is not supported
I was working in a Dockerfile with a base image of node:lts-alpine
(which doesn't have Java at all, so there couldn't be any overwrites/clashes) and unzipping https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip, so it seems that this issue is due to the version of unzip
that comes stock with Alpine.
EDIT: Spoke too soon 😓 Now I'm getting the OP's original error of lchmod (file attributes) error: Not supported
, the files appears to unzip, but I'm having issues actually running the unzipped sonar-scanner. But at the very least, installing unzip
got past the compressed symlink error.
Is this still an issue at this point? Sounds like an annoyance, not a breaking issue? I'm going to close for now and reopen if needed.
For anyone who comes across this. I am using Alpine 3.19 / 3.20. Doing a apk add unzip
resolved the unzip: compressed symlink is not supported
error. Guessing older version of unzip had an error that was addressed in a more recent release.
lchmod (file attributes) error: Not supported