当前位置: 移动技术网 > IT编程>开发语言>.net > DotNetCore跨平台~为debain系统添加阿里云加速

DotNetCore跨平台~为debain系统添加阿里云加速

2018年03月29日  | 移动技术网IT编程  | 我要评论

邮政包裹资费,泰迪熊犬价格,单身初恋日记

直接把它阿里云的镜像覆盖到原来的/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"]

这样以后安软件就快了。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网