用Docker发布Study.BlazorOne.Blazor到公网测试服务器
# 1、准备公网上的测试数据库。
之前我们在Visual Studio里面调试的时候,使用的都是localhost的数据库。现在需要在公网上准备一个SQL Server。然后执行下面的步骤
1)把Study.BlazorOne.DbMigrator设置为启动项目;
2)修改appsettings.json中的连接字符串
将本地localhost的配置注释掉,加上公网的连接字符串

3)运行DbMigrator

# 2、为Study.BlazorOne.Blazor项目启用Dockers支持



# 3、在解决方案根目录下放置自动集成的配置文件

# 4、签入代码,尝试首次让gitlab的runner来构建Docker镜像
Gitlab中显示的完整信息如下
Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.loda.net.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:01
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Created fresh repository.
Checking out 42f160af as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:12
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ docker login -u $DOCKER_DEV_USERNAME -p $DOCKER_DEV_PASSWORD $DOCKER_DEV_SERVER
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
$ cd .
$ docker build -t $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG -f src/Study.BlazorOne.Blazor/Dockerfile --no-cache .
Step 1/24 : FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
7.0: Pulling from dotnet/aspnet
Get "https://mcr.microsoft.com/v2/dotnet/aspnet/manifests/sha256:136deb59fc62f52d7d9dde928cdefeaa7b25ef72c4e8bc8c56e676c6b5d7ab53": net/http: TLS handshake timeout
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
卡在了最后一步,就是从microsoft.com下载aspnet:7.0的基础镜像的时候,TLS握手超时。
简单,我们在自己的私有docker registry中放置这个aspnet:7.0的基础镜像即可。
然后修改Study.BlazorOne.Blazor项目的Dockerfile文件,改动第3行和第8行,指向我们修改过后的基础镜像:

签入代码。Gitlab的Runner立即尝试自动构建。
# 5、看起来顺利构建,但是还是卡在最后一步:
a0acdda47b2a: Retrying in 1 second
e2fed13a1ac3: Retrying in 1 second
03cef3692ade: Retrying in 1 second
39d424e26f18: Waiting
unknown: Could not resolve ProGet feed "study". Docker repository names in ProGet must include the feed as a prefix. Example: MyFeed/library/ubuntu
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
这个错误的意思,是我们指定的路径是用于上传NuGet包的,不能用于推送Docker镜像。重新在ProGet里面创建新的Feed,用于储存Docker的构建的成果。然后修改.gitlab-ci.yml中的变量。修改了下图第9行的URL:

签入代码,Gitlab中立即调用了Runner,成功自动构建。

# 6、上图显示,自动集成任务的第一步,构建Docker镜像是成功了,第二步报错。
错误信息如下:
Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:01
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Checking out 0087e923 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache 00:00
Checking cache for default-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script 00:01
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd /root/.ssh
$ cp /home/gitlab-runner/ssh/* .
$ echo "部署到Brain测试站……"
部署到Brain测试站……
$ cd /home/gitlab-runner/scripts
$ bash ssh-deploy.sh blazor_one_test 8606 80 $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG amisoft $DOCKER_DEV_SERVER $DOCKER_DEV_USERNAME $DOCKER_DEV_PASSWORD $SSH_AUTO_LOGIN_USER $TEST_APP_SERVER
docker容器实例名称: blazor_one_test
目标服务器对外端口号 8606
docker容器开放端口号 80
docker镜像URL proget.abcdefg.cn/study-images/blazor:15
容器启动配置环境 amisoft
Docker服务器DNS名称 proget.abcdefg.cn
登入Docker服务器的用户名称 usernamexxxxx
登入Docker服务器的密码 myPassword
SSH自动登入目标服务器使用的用户名 username
SSH自动登入的目标服务器 proget.abcdefg.cn
在服务器上执行的命令是
docker run -d --privileged=true --restart=always -d --name blazor_one_test -v /mnt/data/yee-change:/var/config -e ASPNETCORE_ENVIRONMENT=amisoft -p 8606:80 proget.abcdefg.cn/study-images/blazor:15
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added 'proget.abcdefg.cn,47.106.133.5' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
username@proget.abcdefg.cn: Permission denied (publickey,password).
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
很清楚,SSH登入服务器的时候,被拒绝了。
# 7、让Gitlab的Runner能自动登入用于运行容器的测试服务器
很简单,在服务器上创建名为tommy的linux用户,在该用户的/home/tommy/.ssh文件夹的密钥文件里,加入我们的公钥
# 8、再次触发自动集成
得到如下错误:
Welcome to Alibaba Cloud Elastic Compute Service !
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
bash: /home/great/docker/gitlab/runner/deploy.sh: No such file or directory
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
上述错误很简单,是服务器的/home/greate/docker/gitlab/runner这个目录下,没有deploy.sh这个脚本,这个脚本的内容如下:
#!/bin/bash
conName=$1
eonPort=$2
conPort=$3
images=$4
count=`docker ps -a |grep "$conName"|wc -l `
if [ $count -eq 0 ];then
echo "$conName container is not exit"
else
id=$(docker ps -a |grep "$conName" |awk '{print $1}')
for i in $id
do
docker stop $i
docker rm $i
done
fi
docker rmi $images
docker login -u david -p NXbdusoeiu*2349243_ded docker.amicap.cn
docker run --restart=always -d --name $conName -v /mnt/config:/var/config -e ASPNETCORE_ENVIRONMENT=$5 -p $eonPort:$conPort $images
拷贝到服务器后,记得改一下权限。
# 9、再次触发自动集成
在Gitlab中的完整日志控制台输出如下
Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:00
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Checking out b34700f3 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache 00:01
Checking cache for default-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script 00:01
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd /root/.ssh
$ cp /home/gitlab-runner/ssh/* .
$ echo "部署到Brain测试站……"
部署到Brain测试站……
$ cd /home/gitlab-runner/scripts
$ bash ssh-deploy.sh blazor_one_test 8606 80 $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG amisoft $DOCKER_DEV_SERVER $DOCKER_DEV_USERNAME $DOCKER_DEV_PASSWORD $SSH_AUTO_LOGIN_USER $TEST_APP_SERVER
docker容器实例名称: blazor_one_test
目标服务器对外端口号 8606
docker容器开放端口号 80
docker镜像URL proget.abcdefg.cn/study-images/blazor:17
容器启动配置环境 amisoft
Docker服务器DNS名称 proget.abcdefg.cn
登入Docker服务器的用户名称 username@docker
登入Docker服务器的密码 MySecretPassword
SSH自动登入目标服务器使用的用户名 great
SSH自动登入的目标服务器 proget.abcdefg.cn
在服务器上执行的命令是
docker run -d --privileged=true --restart=always -d --name blazor_one_test -v /mnt/data/yee-change:/var/config -e ASPNETCORE_ENVIRONMENT=amisoft -p 8606:80 proget.abcdefg.cn/study-images/blazor:17
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added 'proget.abcdefg.cn,47.106.133.5' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
great@proget.abcdefg.cn: Permission denied (publickey,password).
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1
# 10、如果Gitlab的Runner不联络服务器,不领取工作
可以执行下面两个命令
root@dev-server:~# docker exec -it gr02 gitlab-runner verify
Runtime platform arch=amd64 os=linux pid=7 revision=436955cb version=15.11.0
Running in system-mode. Verifying runner... is alive runner=YozfsKoh
root@dev-server:~# docker exec -it gr02 gitlab-runner restart
Runtime platform arch=amd64 os=linux pid=28 revision=436955cb version=15.11.0
# 11、登入被拒绝
查了很多文件,也没搞定。于是换了一台测试服务器。成功发布
Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:00
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Checking out 832423e6 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache 00:01
Checking cache for default-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script 00:39
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd /root/.ssh
$ cp /home/gitlab-runner/ssh/* .
$ echo "部署到Brain测试站……"
部署到Brain测试站……
$ cd /home/gitlab-runner/scripts
$ bash ssh-deploy.sh blazor_one_test 8606 80 $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG AliyunTest $DOCKER_DEV_SERVER $DOCKER_DEV_USERNAME $DOCKER_DEV_PASSWORD $SSH_AUTO_LOGIN_USER $TEST_APP_SERVER
docker容器实例名称: blazor_one_test
目标服务器对外端口号 8606
docker容器开放端口号 80
docker镜像URL proget.abcdefg.cn/study-images/blazor:22
容器启动配置环境 AliyunTest
Docker服务器DNS名称 proget.abcdefg.cn
登入Docker服务器的用户名称 username@docker
登入Docker服务器的密码 MySecret123
SSH自动登入目标服务器使用的用户名 david
SSH自动登入的目标服务器 172.16.0.199
在服务器上执行的命令是
docker run -d --privileged=true --restart=always -d --name blazor_one_test -v /mnt/data/yee-change:/var/config -e ASPNETCORE_ENVIRONMENT=AliyunTest -p 8606:80 proget.abcdefg.cn/study-images/blazor:22
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '172.16.0.199' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-72-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sun May 21 07:07:31 PM UTC 2023
System load: 1.8740234375
Usage of /: 43.6% of 97.87GB
Memory usage: 21%
Swap usage: 0%
Temperature: 76.0 C
Processes: 495
Users logged in: 1
IPv4 address for br-520215db1f30: 172.20.0.1
IPv4 address for br-5be0717938c9: 172.19.0.1
IPv4 address for br-76c941d48dc2: 10.10.3.1
IPv4 address for br-f98ed0d36211: 172.18.0.1
IPv4 address for docker0: 172.17.0.1
IPv4 address for enp86s0: 172.16.0.199
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
1 update can be applied immediately.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
4a109ae04f06
4a109ae04f06
Untagged: proget.abcdefg.cn/study-images/blazor:22
Untagged: proget.abcdefg.cn/study-images/blazor@sha256:44721bba14a6d98370582bb875eedb8a20809febe60e64169fee767b5edee0de
Deleted: sha256:0979c4238750443e1e0174fb1dfae269fac53e701eea075ec09baa8e921ff258
Deleted: sha256:bc05348c1108ee9a0c7d92cbd13fab85cdec49a9e540b462e06298f1eb82b3fb
Deleted: sha256:b6692a838b82591c27920dee0e947bb5b221843b983644e2b4555e5e0f37362b
Deleted: sha256:5012a44cce34ce6e752a17db8d5c935e336e84f78239389e756d1163790c1fb5
Deleted: sha256:08c9e070d99c38128ba4615a7f30a31349a09f95323e075f1456fd97a9a3e8e5
Deleted: sha256:6a3a81deb5e13495f765faaccceab8a4f46a82caa7ae4968a7bc7fea973431dc
Deleted: sha256:86de30b98c0d4a0999180ff2971a9a7269596d90d9484048f49757c1ac90ec35
Deleted: sha256:9221e97be3386aa9ad1d2c386919536261cb30ed0117bc300894b542f344cd9d
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/david/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
Unable to find image 'proget.abcdefg.cn/study-images/blazor:22' locally
22: Pulling from study-images/blazor
9e3ea8720c6d: Already exists
2436f232d040: Already exists
9a2730c0a140: Already exists
6bb6cfc88137: Already exists
8bc8046fd854: Already exists
5016cd0016e4: Already exists
59395839e470: Already exists
19dc23f69568: Already exists
71f1b4b01e35: Already exists
1868690bc889: Already exists
371a028335d5: Already exists
c110905bfc27: Already exists
63d18f70c3d6: Already exists
424a907a98a6: Already exists
a2552f8f5db0: Already exists
cd1c5a79ba5c: Already exists
aefe6775f233: Already exists
31a7c2980e89: Already exists
df0689172fdf: Pulling fs layer
658b7d3a4525: Pulling fs layer
df0689172fdf: Verifying Checksum
df0689172fdf: Pull complete
658b7d3a4525: Verifying Checksum
658b7d3a4525: Download complete
658b7d3a4525: Pull complete
Digest: sha256:44721bba14a6d98370582bb875eedb8a20809febe60e64169fee767b5edee0de
Status: Downloaded newer image for proget.abcdefg.cn/study-images/blazor:22
bc571017f1006bdaed1c000110199d95d0d5c1a6cd7609bc9c26b7a938b9dd29
Saving cache for successful job 00:01
Creating cache default-protected...
WARNING: node_modules/: no matching files. Ensure that the artifact path is relative to the working directory (/builds/YozfsKoh/0/study/blazor-one)
Archive is up to date!
Created cache
Cleaning up project directory and file based variables 00:01
Job succeeded
12、在测试服务器上,运行docker logs blazor_one_test
发现不停的报如下错误:
[18:57:26 FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> System.IO.FileNotFoundException: Signing Certificate couldn't found: /app/authserver.pfx
at Study.BlazorOne.Blazor.BlazorOneBlazorModule.GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration) in /src/src/Study.BlazorOne.Blazor/BlazorOneBlazorModule.cs:line 357
at Study.BlazorOne.Blazor.BlazorOneBlazorModule.<>c__DisplayClass0_0.<PreConfigureServices>b__3(OpenIddictServerBuilder builder) in /src/src/Study.BlazorOne.Blazor/BlazorOneBlazorModule.cs:line 128
at Volo.Abp.Options.PreConfigureActionList`1.Configure(TOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionPreConfigureExtensions.ExecutePreConfiguredActions[TOptions](IServiceCollection services, TOptions options)
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.<>c__DisplayClass1_0.<AddOpenIddictServer>b__0(OpenIddictServerBuilder builder)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
--- End of inner exception stack trace ---
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
at Study.BlazorOne.Blazor.Program.Main(String[] args) in /src/src/Study.BlazorOne.Blazor/Program.cs:line 36
未完待续。
用Docker发布Study.BlazorOne.Blazor到公网测试服务器的更多相关文章
- .NET Core使用skiasharp文字头像生成方案(基于docker发布)
一.问题背景 目前.NET Core下面针对于图像处理的库微软并没有集成,在.NET FrameWork下我们已经习惯使用System.Drawing类库做简单的图像处理,到了.NET Core下一脸 ...
- Docker 发布 Abp net core web 服务
Docker 发布 Abp net core web 服务 准备工作:Abp 项目,这个是模板下载地址 https://aspnetboilerplate.com/Templates (本例使用的是S ...
- docker 发布方式尝试
docker 发布方式尝试 目前有个小项目, 尝试用docker的方式来发布, 项目只有一个节点, 使用 kubenate 有点小题大做, 所以采用docker-compose来发布. 发布过程 GI ...
- docker 发布应用时添加 git revision
概要 实施步骤 获取 git revision 前端 git revision 注入 后端 git revision 注入 概要 docker 发布应用时, 将 git revision 注入到应用中 ...
- Jenkins+Harbor+Docker发布
使用Jenkins发布Docke 需要准备的,docker,jenkins,Harbor docker安装 安装依赖: # yum install -y yum-utils device-mapper ...
- 结合docker发布后端项目(基于gradle包管理)的shell脚本
结合docker发布后端项目(基于gradle包管理)的shell脚本 本教程依据个人理解并经过实际验证为正确,特此记录下来,权当笔记. 注:基于linux操作系统(敏感信息都进行了处理) 目前主流的 ...
- 结合docker发布前端项目(基于npm包管理)的shell脚本
结合docker发布前端项目(基于npm包管理)的shell脚本 本教程依据个人理解并经过实际验证为正确,特此记录下来,权当笔记. 注:基于linux操作系统 目前主流的前后端分离的项目中,常常在部署 ...
- docker发布.net core程序的坑
docker发布遇到的两个问题 1:Could not resolve CoreCLR path. For more details, enable tracing by setting COREHO ...
- Angular入门到精通系列教程(14)- Angular 编译打包 & Docker发布
目录 1. 概要 2. 编译打包 2.1. 基本打包命令 2.2. 打包部署到二级目录 3. Angular站点的发布 3.1. web服务器发布 3.2. 使用docker发布 4. 总结 环境: ...
- 使用Docker发布blazor wasm
Blazor编译后的文件是静态文件,所以我们只需要一个支持静态页面的web server即可. 根据不同项目,会用不同的容器编排,本文已无网关的情况下为例,一步一步展示如何打包进docker 需求 H ...
随机推荐
- 银河麒麟系统信息获取V1.0版本
银河麒麟系统信息获取 摘要 最近项目有一些兼容性测试需求. 可能需要获取一些系统配置信息便于相关的工作. 想着自己总结一下. 便于后续的不太熟悉的同事进行简要处理 银河麒麟获取版本 nkvers # ...
- 真·Android Zxing 扫码中文乱码解决
Zxing3.2.1 之前遇到过Android Zxing扫码乱码的问题,网上搜了下解决了下. 今天又遇到了问题. 依然会乱码. 研究总结如下: Zxing 可以在Hints中添加默认编码格式.这个编 ...
- 在k8s中的控制器和部署服务-ReplicationController和ReplicaSet
pod 代表了 k8s 中的基本部署单元,但是在实际应用场景中,服务不可能是单个pod运行的,否则会出现"单点".在 k8s 中对 pod 的托管部署,专门抽象成了单独的资源.其中 ...
- _0x4c9738 怎么还原?嘿,还真可以还原!
_0x4c9738 变量名还原,噂嘟假嘟? 代码混淆(obfuscation)和代码反混淆(deobfuscation)在爬虫.逆向当中可以说是非常常见的情况了,初学者经常问一个问题,类似 _0x4c ...
- Golang并发控制方式有几种?
Go语言中的goroutine是一种轻量级的线程,其优点在于占用资源少.切换成本低,能够高效地实现并发操作.但如何对这些并发的goroutine进行控制呢? 一提到并发控制,大家最先想到到的是锁.Go ...
- 补齐短板-开源IM项目OpenIM关于初始化/登录/好友接口文档介绍
OpenIM文档方面的建设一直远远落后于开发, 也经常被开发者诟病,在接下来一周的时间里,我们重点补齐文档,让开发者更轻松接入.由于app sdk底层都是go来实现,所以本文先写一个模板和框架,在接下 ...
- 从Spring源码看Spring如何解决循环引用的问题
Spring如何解决循环引用的问题 关于循环引用,首先说一个结论: Spring能够解决的情况为:两个对象都是单实例.且通过set方法进行注入. 两个对象都是单实例,通过构造方法进行注入,Spring ...
- Java注解之获取注解内部数据的原因分析
我们都知道从JDK1.5开始,注解开始被支持使用,当我们在使用注解的时候感觉比配置文件用起来更加简便和清爽.配置文件是通过解析配置文件的内容获取到数据,那么为什么仅仅在类.方法或者属性上添加注解被注解 ...
- 面试官:什么是JIT、逃逸分析、锁消除、栈上分配和标量替换?
JIT.逃逸分析.锁消除.栈上分配和标量替换等都属于 JVM 的优化手段,JVM 优化手段是指在运行 Java 程序时,通过对字节码的编译和执行过程进行优化,以提升程序的性能和效率. JVM 优化手段 ...
- GJK算法:两个凸集的碰撞测试
GJK算法用于判断两个凸集是否相交,其中GJK是三个提出者的姓名首字母.为了便于理解(偷懒),下面的内容都只在二维平面内讨论. 1. 回顾凸集 可能有很多小伙伴忘了什么是凸集.凸集有很多等价的 ...