1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| ARG UBUNTU_VERSION=18.04 FROM ubuntu:${UBUNTU_VERSION} ARG DOTNET_VERSION=5.0
RUN cd /tmp \ && sed -i 's@/deb.debian.org/@/mirrors.aliyun.com/@g' /etc/apt/sources.list \ && apt-get update \ && apt-get install apt-utils libgdiplus libc6-dev -y \ && apt install -y wget \ && wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt-get update \ && apt-get install -y apt-transport-https \ && apt-get update \ && apt-get install -y aspnetcore-runtime-${DOTNET_VERSION} \ && set -x \ && export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get install -y tzdata \ && ln -sf /usr/share/zoneinfo/Asia/ShangHai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone \ && wget -O /usr/share/fonts/mryh.ttf http://dev.dianmi-north.cn:32110/fonts/微软雅黑.ttf \ && apt-get install fontconfig -y \ && fc-cache -vf \ && fc-list \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/' /etc/ssl/openssl.cnf \ && sed -i 's/CipherString = DEFAULT@SECLEVEL=2/CipherString = DEFAULT@SECLEVEL=1/' /etc/ssl/openssl.cnf
ENV \ ASPNETCORE_URLS=http://+:80 \ DOTNET_RUNNING_IN_CONTAINER=true
|