This commit is contained in:
zhouying
2023-11-02 12:41:42 +08:00
27 changed files with 196 additions and 58 deletions

26
docker/aspnet-cn/error.md Normal file
View File

@ -0,0 +1,26 @@
## release模式下报错
```c#
//错误:
//System.IO.FileNotFoundException: 'Could not load file or assembly 'Anonymously Hosted DynamicMethods Assembly, Culture=neutral, PublicKeyToken=null'. 系统找不到指定的文件。'
//解决方法:
//在数据库项目的文件里加入
AssemblyString = "RapidApp.DataPersistence";
```
![Alt text](image.png)
## 启动项目找不到 *(项目名.xml)*
1. 下图文件找不到
![Alt text](image-1.png)
2. 右击->properties
![Alt text](image-2.png)
3. 修改
![Alt text](image-3.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docker/aspnet-cn/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -10,7 +10,7 @@ docker ps
### 启动、停止、重启容器
```
```bash
docker start {容器名称或者Id}
docker stop {容器名称或者Id}
@ -18,6 +18,7 @@ docker stop {容器名称或者Id}
docker restart {容器名称或者Id}
```
<<<<<<< HEAD
### 查看镜像
```
docker images
@ -46,4 +47,19 @@ df -h
### 查看目录下每个文件夹的大小
```
du -h -d1 {路径}
```
```
=======
### 进入容器
```bash
docker exec -it [containerName] bash
```
### 镜像构建命令
```bash
docker build -t [imagesName] -f Dockerfile .
```
ps:命令要在 Dockerfile 在的目录下执行
>>>>>>> 7f7fc1406d4278f4b5c10b95bbe521e61f3b63db

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

14
docker/issue.md Normal file
View File

@ -0,0 +1,14 @@
<h1>Docker 相关的问题讨论</h1>
## 解决 Docker 容器不支持中文的问题,中文乱码问题
#### 编写 Dockerfile
```Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app #容器内的工作目录
EXPOSE 80 #容器监听的端口
ADD /Fonts/* /usr/share/fonts/ #中文字体
ENV LANG=C.UTF-8 #容器默认编码
ENTRYPOINT ["dotnet","RapidApp.Api.dll"]
```

View File

@ -1,49 +0,0 @@
<h1>解决docker中文乱码</h1>
## 构建镜像
1. 编写Dockerfile
```Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app #容器内的工作目录
EXPOSE 80 #容器监听的端口
ADD /Fonts/* /usr/share/fonts/ #中文字体
ENV LANG=C.UTF-8 #容器默认编码
ENTRYPOINT ["dotnet","RapidApp.Api.dll"]
```
2. 构建命令
```cmd
docker build -t [imagesName] -f Dockerfile .
```
ps:命令要在Dockerfile在的目录下执行
## 添加容器
![Alt text](image.png)
## 查看容器字体
1. 进入容器
```cmd
docker exec -it [containerName] bash
```
![Alt text](image-1.png)
2. 查看字体
* fc-list :查看所有字体
* fc -list:lang-zh:查看中文字体
![Alt text](image-2.png)
3. 命令不起作用
如果出现以下信息
```cmd
bash: fc-list: command not found
```
解决:
```cmd
apt-get update
apt-get upgrade
apt-get install fontconfig
```