Skip to content

Commit

Permalink
Update Dockerfile for DotNetCore 2.2 with SonarScanner 5.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gafda committed Dec 15, 2020
1 parent 5bd50b6 commit 81fc1ce
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.403
FROM mcr.microsoft.com/dotnet/core/sdk:2.2.402

# Dockerfile meta-information
LABEL maintainer="NOS Inovação S.A." \
app_name="dotnet-sonar"

ENV SONAR_SCANNER_MSBUILD_VERSION=4.10.0.19059 \
DOTNETCORE_SDK=3.1.403 \
DOTNETCORE_RUNTIME=3.1.9 \
NETCOREAPP_VERSION=netcoreapp3.0 \
DOCKER_VERSION=5:19.03.12~3-0~debian-buster \
CONTAINERD_VERSION=1.2.13-2 \
OPENJDK_VERSION=11
ENV SONAR_SCANNER_MSBUILD_VERSION=5.0.4.24009 \
DOTNETCORE_SDK=2.2.207 \
DOTNETCORE_RUNTIME=2.2.8 \
NETCOREAPP_VERSION=netcoreapp2.0 \
DOCKER_VERSION=5:19.03.13~3-0~debian-stretch \
CONTAINERD_VERSION=1.3.7-1 \
OPENJDK_VERSION=11 \
NODEJS_VERSION=15

# HACK: OpenJava 11+ is NOT native supported by Debian9
RUN echo 'deb http://ftp.debian.org/debian stretch-backports main' | tee /etc/apt/sources.list.d/stretch-backports.list

# Linux update
RUN apt-get update \
Expand All @@ -22,8 +26,16 @@ RUN apt-get update \
gnupg-agent \
software-properties-common

RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1

# Install Java
RUN apt-get install -y openjdk-$OPENJDK_VERSION-jre
RUN apt-get install -y openjdk-$OPENJDK_VERSION-jre \
&& java -version

# Install NodeJs
RUN wget https://deb.nodesource.com/setup_$NODEJS_VERSION.x \
&& bash setup_$NODEJS_VERSION.x \
&& apt-get install -y nodejs

# Install all necessary additional software
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
Expand Down

0 comments on commit 81fc1ce

Please sign in to comment.