1.下载
https://dotnet.microsoft.com/zh-cn/download/dotnet
- 选择该版本
- 下载
shell
https://download.visualstudio.microsoft.com/download/pr/a256265b-0ec6-4b63-b943-bc27bcfc98c0/47c8bbd54d7f6dbfe0ca4985c410282e/dotnet-sdk-7.0.408-linux-x64.tar.gz
https://download.visualstudio.microsoft.com/download/pr/a256265b-0ec6-4b63-b943-bc27bcfc98c0/47c8bbd54d7f6dbfe0ca4985c410282e/dotnet-sdk-7.0.408-linux-x64.tar.gz
2.安装
shell
#此版本是二进制,直接解压即可使用
tar zxvf dotnet-sdk-7.0.408-linux-x64.tar.gz -C /data/apps/dotnet7.0
#此版本是二进制,直接解压即可使用
tar zxvf dotnet-sdk-7.0.408-linux-x64.tar.gz -C /data/apps/dotnet7.0
3.dotnet配置环境变量
shell
cat /etc/profile.d/dotnet.sh
export DOTNET_PATH=/data/apps/dotnet7.0
export PATH=${DOTNET_PATH}:$PATH
cat /etc/profile.d/dotnet.sh
export DOTNET_PATH=/data/apps/dotnet7.0
export PATH=${DOTNET_PATH}:$PATH
4.dockerfile
yaml
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
ENV ASPNETCORE_URLS=http://+:10012
WORKDIR /vela/app
#
#RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free" > /etc/apt/sources.list
RUN apt-get --allow-releaseinfo-change update -y && apt-get install -y libgdiplus libc6-dev
ENTRYPOINT chmod +x Activity.Core && /vela/app/Activity.Core
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
ENV ASPNETCORE_URLS=http://+:10012
WORKDIR /vela/app
#
#RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free" > /etc/apt/sources.list
RUN apt-get --allow-releaseinfo-change update -y && apt-get install -y libgdiplus libc6-dev
ENTRYPOINT chmod +x Activity.Core && /vela/app/Activity.Core