DotNetCore跨平台~为debain系统添加阿里云加速
直接把它阿里云的镜像覆盖到原来的/etc/apt/sources.list文件
cat > /etc/apt/sources.list << EOF deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb http://mirrors.aliyun.com/debian/ stretch-proposed-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-proposed-updates main non-free contrib EOF
这样再进行apt-get update就快了
apt-get install就可以安装你的程序了,在dockefile里也可以把它添加,方便你的容器里安装软件,这样可以一劳永逸!
FROM microsoft/aspnetcore:2.0 ARG source RUN cat > /etc/apt/sources.list << EOF deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb http://mirrors.aliyun.com/debian/ stretch-proposed-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib deb-src http://mirrors.aliyun.com/debian/ stretch-proposed-updates main non-free contrib EOF RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone RUN apt-get update && apt-get -y install libgdiplus && apt-get clean WORKDIR /app EXPOSE 80 COPY ${source:-publish} . ENTRYPOINT ["dotnet", "SMS.dll"]
这样以后安软件就快了。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
2014-03-28 知方可补不足~CSS中的几个伪元素
2013-03-28 代码艺术~优雅的编程字体及对字体的感觉