Tool path specified for dotnet tool installation (#1249)

* Tool path specified for dotnet tool installation

A tool path is specified to prevent installation of dotnet tools into /root/.dotnet/. Instead dotnet tools are installed into /var/cache/dotnet. This allows all users to access installed dotnet tools. Especially useful in unprivileged container runtimes.
Fixes #1153

* Old global option removed

* PATH updated

* typo

* Installing into /var/cache/dotnet/tools
This commit is contained in:
Andreas 2021-02-22 15:18:50 +01:00 committed by GitHub
parent 0e6e3dc908
commit 0ee6579a66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,9 +147,9 @@ RUN bundle install
RUN wget --tries=5 -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \ RUN wget --tries=5 -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \ && chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel Current -version latest \ && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel Current -version latest \
&& /usr/share/dotnet/dotnet tool install -g dotnet-format && /usr/share/dotnet/dotnet tool install --tool-path /var/cache/dotnet/tools dotnet-format
ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" ENV PATH="${PATH}:/var/cache/dotnet/tools:/usr/share/dotnet"
############################## ##############################
# Installs Perl dependencies # # Installs Perl dependencies #