forked from vishalhcl-5960/appscan-dast-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresence_dockerfile
15 lines (15 loc) · 1.1 KB
/
presence_dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM registry.access.redhat.com/ubi8/ubi:latest
LABEL description="AppScan Presence in Dockerfile for Linux Image"
#ENV APIKEYID 082c4037-2bd5-380a-09e1-a1754a5eaab0
#ENV APIKEYSECRET fMM4inw4zR2ip3ovtZHyVLoRenA2sd9Fq9MRNhjTx5s=
#ENV PRESENCEID 8f2c5776-e2d3-ed11-800f-14cb65723612
RUN yum install -y unzip && yum clean all
#RUN curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"KeyId":"'"${APIKEYID}"'","KeySecret":"'"${APIKEYSECRET}"'"}' 'https://cloud.appscan.com/api/V2/Account/ApiKeyLogin' > /root/output.txt
#RUN curl -X POST --header 'Accept: application/zip' --header 'Content-Length: 0' --header "Authorization: Bearer $(grep -oP '(?<="Token":")[^"]*' /root/output.txt)" https://cloud.appscan.com/api/v2/Presences/$PRESENCEID/Download/Linux_x86_64/v2 > /root/AppScanPresence-Linux_x86_64.zip
#RUN ls
COPY presence.zip /root
RUN mkdir /root/presence/ && unzip /root/presence.zip -d /root/presence/
RUN chmod +x /root/presence/startPresence.sh
ENTRYPOINT ["/root/presence/startPresence.sh"]
#ENTRYPOINT ["sh","/root/AppScanPresence/startPresence.sh"]
#ENTRYPOINT ["/bin/sh"]