Skip to content

Commit 43ae196

Browse files
committed
Remove DOTNET_CLI_HOME
1 parent b11694b commit 43ae196

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

Dockerfile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Test base image in shell:
1+
# Test MSCR image in shell:
2+
# docker run -it --rm --pull always --name Testing mcr.microsoft.com/dotnet/sdk:latest /bin/bash
3+
4+
# Test LSIO image in shell:
25
# docker run -it --rm --pull always --name Testing lscr.io/linuxserver/code-server:latest /bin/bash
36
# export DEBIAN_FRONTEND=noninteractive
47

@@ -11,14 +14,18 @@
1114
# Test linux/amd64 target
1215
# docker buildx build --load --progress plain --no-cache --platform linux/amd64 --tag testing:latest .
1316
# docker run -it --rm --name Testing testing:latest /bin/bash
17+
# docker run -d --name Testing testing:latest
18+
# http://localhost:8443/
19+
# docker stop Testing
20+
# docker rm Testing
1421

1522

1623

1724
# https://github.com/linuxserver/docker-code-server
1825
FROM lscr.io/linuxserver/code-server:latest
1926

2027
# Image label
21-
# TODO: Get current STS and LTS versions dynamically
28+
# TODO: Get current LTS and STS versions dynamically
2229
ARG LABEL_VERSION="60.70"
2330
LABEL name="VSCode-Server-DotNet" \
2431
version=${LABEL_VERSION} \
@@ -58,16 +65,18 @@ RUN apt-get update && apt-get upgrade -y \
5865
&& apt-get clean \
5966
&& rm -rf /var/lib/apt/lists/*
6067

61-
# TODO: What is preferred way to set the root and get in path?
68+
# Set .NET root to same path used for installation
69+
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#set-environment-variables
6270
ENV DOTNET_ROOT=/usr/share/dotnet
63-
ENV DOTNET_CLI_HOME=/usr/share/dotnet
6471

6572
# Install .NET
6673
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
74+
# https://github.com/dotnet/install-scripts/blob/main/src/dotnet-install.sh
6775
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
6876
&& chmod +x ./dotnet-install.sh \
69-
&& ./dotnet-install.sh --install-dir /usr/share/dotnet --version latest --channel LTS\
70-
&& ./dotnet-install.sh --install-dir /usr/share/dotnet --version latest --channel STS\
77+
&& ./dotnet-install.sh --install-dir /usr/share/dotnet --version latest --channel LTS \
78+
&& ./dotnet-install.sh --install-dir /usr/share/dotnet --version latest --channel STS \
79+
&& rm ./dotnet-install.sh \
7180
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
7281
&& dotnet --list-runtimes \
7382
&& dotnet --list-sdks \

0 commit comments

Comments
 (0)