You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ARG JDK_VERSION=17
  2. FROM eclipse-temurin:${JDK_VERSION}-jdk-jammy
  3. ENV DEBIAN_FRONTEND=noninteractive
  4. SHELL ["/bin/bash", "-o", "pipefail", "-c"]
  5. RUN set -o errexit -o nounset \
  6. && groupadd --system --gid 1000 sonarsource \
  7. && useradd --system --gid sonarsource --uid 1000 --shell /bin/bash --create-home sonarsource
  8. RUN echo 'Acquire::AllowReleaseInfoChange::Suite "true";' > /etc/apt/apt.conf.d/allow_release_info_change.conf
  9. # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199#23
  10. RUN mkdir -p /usr/share/man/man1 \
  11. && apt-get update \
  12. && apt-get -y install --no-install-recommends \
  13. lsb-release \
  14. ca-certificates \
  15. curl \
  16. wget \
  17. gnupg \
  18. && apt-get clean \
  19. && rm -rf /var/lib/apt/lists/*
  20. ARG NODE_MAJOR=18
  21. RUN DISTRO="$(lsb_release -s -c)" \
  22. && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
  23. && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" >> /etc/apt/sources.list.d/nodesource.list \
  24. && curl -sSL https://packages.atlassian.com/api/gpg/key/public | gpg --dearmor -o /etc/apt/keyrings/atlassian.gpg \
  25. && echo "deb [signed-by=/etc/apt/keyrings/atlassian.gpg] https://packages.atlassian.com/debian/atlassian-sdk-deb/ stable contrib" >> /etc/apt/sources.list.d/atlassian-sdk.list \
  26. && curl -sSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/keyrings/adoptium-archive-keyring.gpg \
  27. && echo "deb [signed-by=/etc/apt/keyrings/adoptium-archive-keyring.gpg] https://packages.adoptium.net/artifactory/deb $DISTRO main" >> /etc/apt/sources.list.d/adoptopenjdk.list \
  28. && apt-get update \
  29. && apt-get -y install --no-install-recommends \
  30. git \
  31. unzip \
  32. nodejs="$NODE_MAJOR".* \
  33. jq \
  34. expect \
  35. atlassian-plugin-sdk \
  36. temurin-8-jdk \
  37. xmlstarlet \
  38. && apt-get clean \
  39. && rm -rf /var/lib/apt/lists/* \
  40. && npm install -g yarn
  41. # Avoiding JVM Delays Caused by Random Number Generation (https://docs.oracle.com/cd/E13209_01/wlcp/wlss30/configwlss/jvmrand.html)
  42. RUN sed -i 's|securerandom.source=file:/dev/random|securerandom.source=file:/dev/urandom|g' "$JAVA_HOME/conf/security/java.security"
  43. USER sonarsource
  44. WORKDIR /home/sonarsource