DotNetCore跨(kua)平臺~為(wei)debain系統(tong)添加阿(a)里云加速(su)
直接把(ba)它阿里云的(de)鏡像覆蓋(gai)到原(yuan)來的(de)/etc/apt/sources.list文(wen)件
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
這樣再(zai)進行apt-get update就快(kuai)了
apt-get install就(jiu)可(ke)以安裝(zhuang)你的(de)(de)程序了,在dockefile里(li)也可(ke)以把它(ta)添加,方便你的(de)(de)容(rong)器里(li)安裝(zhuang)軟件(jian),這(zhe)樣可(ke)以一勞永逸!
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"]
這樣(yang)以后安軟件就快(kuai)了。