APPScan CLIENT fails in docker container with appscan.sh version

  docker, java

I have been trying to upload a container with docker and the appscan cli, where I install this via curl. However I have come across several errors, first that the java in the folder jre/bin/java was not being found. installed some dependencies and changed the error to libraries that were not being found. I copied the libraries to the jre/lib/ folder and now the error is as follows:

/home/SAClientUtil.8.0.1445/bin/appscan.sh: line 142:  34 Segmentation fault      "$JAVACMD" -Xmx8g -Dcom.ibm.jsse2.usefipsprovider=true $CLI_CONFIG_OPTS $APPSCAN_OPTS -cp "$APPSCAN_INSTALL_DIR/lib/*" com.ibm.appscan.cli.common.Launcher "$APPSCAN_INSTALL_DIR" "[email protected]"

Line 142 in appscan.sh:


140 - else
141 -         "$JAVACMD" -Xmx8g -Dcom.ibm.jsse2.usefipsprovider=true $CLI_CONFIG_OPTS $APPSCAN_OPTS -cp "$APPSCAN_INSTALL_DIR/lib/*" com.ibm.appscan.cli.common.Launcher "$APPSCAN_INSTALL_DIR" "[email protected]"
142 - fi

Dockerfile

FROM alpine:3
COPY index.sh /usr/bin/index.sh
RUN chmod +x /usr/bin/index.sh

RUN ls /

RUN cd /home && /usr/bin/index.sh
RUN env

index.sh

#! /bin/sh
set -x

apk --no-cache add ca-certificates wget
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
apk add glibc-2.28-r0.apk

apk add --no-cache bash zlib zlib-dev curl libgcc libstdc++ unzip

curl -o appscan.zip https://cloud.appscan.com/api/SCX/StaticAnalyzer/SAClientUtil?os=linux
unzip appscan.zip
rm -rf appscan.zip
find / -name libc.musl-x86_64.so.1
cp /lib/libc.musl-x86_64.so.1 /lib/libz.so.1 /home/SAClientUtil.8.0.1445/jre/lib/
env

export PATH=$PATH:/home/SAClientUtil.8.0.1445/bin:/home/SAClientUtil.8.0.1445/jre/bin
#export JAVA_HOME=/home/SAClientUtil.8.0.1445/jre/
appscan.sh version

The error is given when I try to issue the simple appscan.sh version. how can i proceed?

Source: Docker Questions

LEAVE A COMMENT