21 Star 309 Fork 101

pojianbing / LazyCaptcha

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
pojianbing 提交于 2023-11-24 11:17 . Dockerfile 支持8.0
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM registry.cn-hangzhou.aliyuncs.com/newbe36524/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Sample.NetCore/Sample.NetCore.csproj", "Sample.NetCore/"]
COPY ["Lazy.Captcha.Core/Lazy.Captcha.Core.csproj", "Lazy.Captcha.Core/"]
RUN dotnet restore "Sample.NetCore/Sample.NetCore.csproj"
COPY . .
WORKDIR "/src/Sample.NetCore"
RUN dotnet build "Sample.NetCore.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Sample.NetCore.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
#修改apt-get源,加速apt下载
RUN sed -i s@/deb.debian.org/@/mirrors.163.com/@g /etc/apt/sources.list
RUN cat /etc/apt/sources.list
#安装fontconfig
RUN apt-get clean
RUN apt-get update && apt-get install -y fontconfig
##修改apt-get源,加速apt下载 8.0使用
#USER root
#RUN echo "deb http://mirrors.163.com/debian bullseye main" >> /etc/apt/sources.list
#RUN echo "deb http://mirrors.163.com/debian-security bullseye-security main" >> /etc/apt/sources.list
#RUN echo "deb http://mirrors.163.com/debian bullseye-updates main" >> /etc/apt/sources.list
##安装fontconfig
#RUN apt-get clean
#RUN apt-get update && apt-get upgrade && apt-get install -y fontconfig
ENTRYPOINT ["dotnet", "Sample.NetCore.dll"]
C#
1
https://gitee.com/pojianbing/lazy-captcha.git
git@gitee.com:pojianbing/lazy-captcha.git
pojianbing
lazy-captcha
LazyCaptcha
master

搜索帮助