惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
爱范儿
爱范儿
The Register - Security
The Register - Security
小众软件
小众软件
D
DataBreaches.Net
雷峰网
雷峰网
S
Secure Thoughts
L
LINUX DO - 最新话题
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
F
Fortinet All Blogs
博客园 - 叶小钗
TaoSecurity Blog
TaoSecurity Blog
博客园 - Franky
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
N
News and Events Feed by Topic
S
Security Affairs
The Last Watchdog
The Last Watchdog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs
Latest news
Latest news
O
OpenAI News
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
Google Online Security Blog
Google Online Security Blog
S
Securelist
博客园 - 司徒正美
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
AI
AI
SecWiki News
SecWiki News
G
GRAHAM CLULEY
Cloudbric
Cloudbric
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LINUX DO - 热门话题
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - 过错

vscode的continue中配置第三方模型。以agnes-ai为例 在 Docker 容器中运行 .NET 6 并使用 libgdiplus(通常是为了支持 System.Drawing.Common 进行图片处理),你需要完成以下两个核心步骤 vs code调试netcore linux安装netcore nginx postgresql ssh 各种加速 不使用Debezium,记录PostgreSQL中的数据的数据前后变化 docker加速 python的一些设置 netcore 发布命令 一些代码库 The database cluster initialisation failed but was not the same version as initdb的解决办法(postgresql) NDVI计算 ,c#和python代码实现 使用c#调用chatgpt 。以下代码由ai自动生成。 vs Commit message的使用 Fiddler 替换资源 docker 部署 rabbitmq(持久化) 和postgresql redis mysql 油猴子常用脚本 通过nginx做身份验证网关的方法 ngnix 常用配置 Nginx配置之实现多台服务器负载均衡 Nginx配置优化详解 ngnix代理grpc
为Ubuntu24生成netcore10的镜像,
过错 · 2026-04-16 · via 博客园 - 过错

第一 注意镜像版本。 不能简单改版本号。比如8的时候是jimmy 不是noble

第二 这里添加了一些组件。使其支持windows下的一些组件。

第三 加入了阿里源,否则容器内部执行安装组件,会走官网,有的组件下载不下来。

第四 镜像的源也是用最新的地址,是mcr.azure.cn 不是老的地址

基于官方 .NET 10 Ubuntu 24.04 镜像

FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS base

LABEL maintainer="wang2650@hhyl.com"

==============================

【终极可用版】Ubuntu 24.04 依赖安装

已删除:libgdiplus-dev(不存在)

==============================

RUN set -xe
# 1. 清理错误PPA
rm -rf /etc/apt/sources.list.d/git-core* || true
# 2. 替换阿里云HTTP源
&& rm -f /etc/apt/sources.list
&& echo "deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse" > /etc/apt/sources.list
&& echo "deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse" >> /etc/apt/sources.list
&& echo "deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse" >> /etc/apt/sources.list
&& echo "deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse" >> /etc/apt/sources.list
# 3. 更新
&& apt-get update -o Acquire::ForceIPv4=true --fix-missing
# 4. 安装依赖(删除 libgdiplus-dev)
&& apt-get install -y --no-install-recommends
curl wget ca-certificates
libssl3 libicu74 libgssapi-krb5-2
libgdiplus
fontconfig fonts-wqy-zenhei
libfontconfig1 libfreetype6
libx11-6 libxrender1 libxext6
libjpeg-dev libpng-dev
# 5. 清理
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

生成容器

根据上面的dockerfile文件生成镜像文件
docker build -t shijianjia-app:v1 .

根据镜像文件,生成容器

docker run -d
--name shijianjia-app
--restart always
--network nk
-p 8080:8080
-e TZ=Asia/Shanghai
-v ./publish:/app
-w /app
shijianjia-app:v1
dotnet mm.Admin.WebApi.dll --urls="http://*:8080"

nk是网络名 app容器内工作路径 卷映射 当前的路径下的publish文件夹。 使用上面创建的镜像 shijianjia-app:v1