mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2025-12-15 18:46:31 +00:00
INF-2341 Add step to install PowerShell
This commit is contained in:
parent
d9f1c1474f
commit
76761e52bf
1 changed files with 31 additions and 7 deletions
38
Dockerfile
38
Dockerfile
|
|
@ -1,18 +1,42 @@
|
|||
FROM sonarsource/sonar-scanner-cli:4.7
|
||||
|
||||
LABEL version="1.1.0" \
|
||||
repository="https://github.com/sonarsource/sonarqube-scan-action" \
|
||||
homepage="https://github.com/sonarsource/sonarqube-scan-action" \
|
||||
maintainer="SonarSource" \
|
||||
com.github.actions.name="SonarQube Scan" \
|
||||
com.github.actions.description="Scan your code with SonarQube to detect Bugs, Vulnerabilities and Code Smells in up to 27 programming languages!" \
|
||||
com.github.actions.icon="check" \
|
||||
com.github.actions.color="green"
|
||||
repository="https://github.com/sonarsource/sonarqube-scan-action" \
|
||||
homepage="https://github.com/sonarsource/sonarqube-scan-action" \
|
||||
maintainer="SonarSource" \
|
||||
com.github.actions.name="SonarQube Scan" \
|
||||
com.github.actions.description="Scan your code with SonarQube to detect Bugs, Vulnerabilities and Code Smells in up to 27 programming languages!" \
|
||||
com.github.actions.icon="check" \
|
||||
com.github.actions.color="green"
|
||||
|
||||
# Add certificate in java keystore
|
||||
COPY wildcard_corp_ingenio_com.pem .
|
||||
RUN keytool -keystore /etc/ssl/certs/java/cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias sonarqube -file wildcard_corp_ingenio_com.pem
|
||||
|
||||
# Install PowerShell
|
||||
# https://docs.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.2#installation-steps
|
||||
RUN sudo apk add --no-cache \
|
||||
ca-certificates \
|
||||
less \
|
||||
ncurses-terminfo-base \
|
||||
krb5-libs \
|
||||
libgcc \
|
||||
libintl \
|
||||
libssl1.1 \
|
||||
libstdc++ \
|
||||
tzdata \
|
||||
userspace-rcu \
|
||||
zlib \
|
||||
icu-libs \
|
||||
curl; \
|
||||
RUN sudo apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \
|
||||
lttng-ust
|
||||
RUN wget -O powershell.tar.gz -fSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.3/powershell-7.2.3-linux-alpine-x64.tar.gz; \
|
||||
sudo mkdir -p /opt/microsoft/powershell/7; \
|
||||
sudo tar zxf ./powershell.tar.gz -C /opt/microsoft/powershell/7; \
|
||||
sudo chmod +x /opt/microsoft/powershell/7/pwsh; \
|
||||
sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue