2024年12月

只导出数据,带insert和字段

sudo -u postgres pg_dump -U postgres -d $1 --column-inserts --data-only -t 表名1  -t 表名2   -f $2.sql

导入

#!/bin/bash
sudo -u postgres psql -U postgres -d $1 < $2

1、查看linux中的版本

dotnet --list-runtimes

2、编辑Dockerfile

echo 'FROM mcr.microsoft.com/dotnet/aspnet:6.0.25 AS runtime

# 添加中文字体到正确的位置
#COPY fonts/ /usr/share/fonts/

#时区
RUN cp -r -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo -ne "timezone Asia/Shanghai. (`uname -rsv`)\n" >> /root/.built

WORKDIR /app' > Dockerfile

3、生成镜像

echo 'docker build -t $1 -f Dockerfile .' > build.sh