03 2020 档案

摘要:进入容器 进入容器 在使用 -d 参数时,容器启动后会进入后台。 某些时候需要进入容器进行操作,包括使用 docker attach 命令或 docker exec 命令,推荐大家使用 docker exec 命令,原因会在下面说明。 attach 命令 下面示例如何使用 docker attach 阅读全文
posted @ 2020-03-31 12:23 PanPan003 阅读(724) 评论(0) 推荐(0) 编辑
摘要:CMD 容器启动命令 Docker 不是虚拟机,容器中的应用都应该以前台执行,而不是像虚拟机、物理机里面那样,用 systemd 去启动后台服务,容器内没有后台服务的概念。 对于容器而言,其启动程序就是容器应用进程,容器就是为了主进程而存在的,主进程退出,容器就失去了存在的意义,从而退出,其它辅助进 阅读全文
posted @ 2020-03-31 12:20 PanPan003 阅读(7989) 评论(0) 推荐(0) 编辑
摘要:启动容器 阅读全文
posted @ 2020-03-31 12:15 PanPan003 阅读(100) 评论(0) 推荐(0) 编辑
摘要:COPY 复制文件 ADD 更高级的复制文件 格式: COPY [--chown=<user>:<group>] <源路径>... <目标路径> COPY [--chown=<user>:<group>] ["<源路径1>",... "<目标路径>"] 和 RUN 指令一样,也有两种格式,一种类似于 阅读全文
posted @ 2020-03-31 12:13 PanPan003 阅读(6587) 评论(0) 推荐(0) 编辑
摘要:ARG 构建参数 ENV 设置环境变量 格式有两种: ENV <key> <value> ENV <key1>=<value1> <key2>=<value2>... 这个指令很简单,就是设置环境变量而已, 无论是后面的其它指令,如 RUN,还是运行时的应用,都可以直接使用这里定义的环境变量。 EN 阅读全文
posted @ 2020-03-31 12:12 PanPan003 阅读(6343) 评论(0) 推荐(0) 编辑
摘要:VOLUME 定义匿名卷 格式为: VOLUME ["<路径1>", "<路径2>"...] VOLUME <路径> 之前我们说过,容器运行时应该尽量保持容器存储层不发生写操作,对于数据库类需要保存动态数据的应用,其数据库文件应该保存于卷(volume)中,后面的章节我们会进一步介绍 Docker 阅读全文
posted @ 2020-03-31 12:10 PanPan003 阅读(5719) 评论(0) 推荐(1) 编辑
摘要:利用 commit 理解镜像构成 注意: docker commit 命令除了学习之外,还有一些特殊的应用场合,比如被入侵后保存现场等。 但是,不要使用 docker commit 定制镜像,定制镜像应该使用 Dockerfile 来完成。 镜像是容器的基础,每次执行 docker run 的时候都 阅读全文
posted @ 2020-03-31 11:18 PanPan003 阅读(352) 评论(0) 推荐(0) 编辑
摘要:使用 Dockerfile 定制镜像 docker commit 的学习中,我们可以了解到,镜像的定制实际上就是定制每一层所添加的配置、文件 如果我们可以把每一层修改、安装、构建、操作的命令都写入一个脚本,用这个脚本来构建、定制镜像, dockerfile优势:那么之前提及的无法重复的问题、镜像构建 阅读全文
posted @ 2020-03-31 11:02 PanPan003 阅读(306) 评论(0) 推荐(0) 编辑
摘要:原文:docker build 命令后 . 号的意思 参考文章: https://yeasy.gitbooks.io/docker_practice/content/image/build.html 我们在使用 docker build 命令去构建镜像时,往往会看到命令最后会有一个 . 号。 doc 阅读全文
posted @ 2020-03-31 11:00 PanPan003 阅读(3065) 评论(1) 推荐(1) 编辑
摘要:删除git 缓存 git rm -r --cached . git add . git commit -m 'update .gitignore' .dockerignore 文件从入门到实践 .dockerignore 文件的作用类似于 git 工程中的 .gitignore 。不同的是 .doc 阅读全文
posted @ 2020-03-31 10:55 PanPan003 阅读(7170) 评论(0) 推荐(0) 编辑
摘要:# Dockerfile # base image FROM node:latest LABEL maintainer="B**** Dev <b****dev@****.com>" # set working directory WORKDIR /app EXPOSE 3000 # EXPOSE 阅读全文
posted @ 2020-03-30 16:14 PanPan003 阅读(322) 评论(0) 推荐(0) 编辑
摘要:public static void main(String[] args) { for (String clientIp : CLIENT_IP_LIST) { int index = Math.abs(getHash(clientIp)) % PrincessConfig.SERVER_IP_L 阅读全文
posted @ 2020-03-30 10:48 PanPan003 阅读(256) 评论(0) 推荐(0) 编辑
摘要:原文:看完这篇文章,我奶奶都懂了https的原理 Http存在的问题 上过网的朋友都知道,网络是非常不安全的。尤其是公共场所很多免费的wifi,或许只是攻击者的一个诱饵。还有大家平时喜欢用的万能钥匙,等等。那我们平时上网可能会存在哪些风险呢? 1. 泄密,个人隐私、账户密码等信息可能会被盗取。 2. 阅读全文
posted @ 2020-03-27 19:56 PanPan003 阅读(2058) 评论(0) 推荐(1) 编辑
该文被密码保护。
posted @ 2020-03-27 18:13 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
摘要:原文:An Illustrated Proof of the CAP Theorem 阅读全文
posted @ 2020-03-27 12:15 PanPan003 阅读(95) 评论(0) 推荐(0) 编辑
摘要:原文:再过半小时,你就能明白kafka的工作原理了 会出现什么情况呢? 1、为了这个女朋友,我请假回去拿(老板不批)。 2、小哥一直在你楼下等(小哥还有其他的快递要送)。 3、周末再送(显然等不及)。 4、这个女朋友我不要了(绝对不可能)! 在上面例子中,“快递小哥”和“买女朋友的我”就是需要交互的 阅读全文
posted @ 2020-03-27 12:13 PanPan003 阅读(798) 评论(1) 推荐(1) 编辑
摘要:原文连接:一次给女朋友转账引发我对分布式事务的思考 本地事务 谈到本地事务,大家可能都很熟悉,因为这个数据库引擎层面能支持的!所以也称数据库事务,数据库事务四大特征:原子性(A),一致性(C),隔离性(I)和持久性(D),而在这四大特性中,我认为一致性是最基本的特性,其它的三个特性都为了保证一致性而 阅读全文
posted @ 2020-03-27 12:03 PanPan003 阅读(196) 评论(0) 推荐(0) 编辑
摘要:原文链家:为什么 K8s 在阿里能成功?| 问底中国 IT 技术演进 着重描述了阿里巴巴基于 K8s 的云原生改造实践过程的三大能力升级,在对应能力升级过程中沉淀的技术解决方案,以及通过这些能力升级所取得的业务价值。 云原生技术也从原来的应用容器化发展出包括容器、Service Mesh、微服务、不 阅读全文
posted @ 2020-03-27 11:41 PanPan003 阅读(2292) 评论(0) 推荐(0) 编辑
摘要:原文:不懂数据库索引的底层原理?那是因为你心里没点b树 这么大的图书馆,我为什么能在这么短的时间内找到我要的书?如果这些书是杂乱无章的堆放,或者没有任何标识的放在书架,我还能这么快的找到吗? 这不禁让我想到了我们开发中用到的数据库,图书馆的书就类似我们数据表中的数据,楼层索引牌、书架分类标识、索书号 阅读全文
posted @ 2020-03-26 11:08 PanPan003 阅读(738) 评论(0) 推荐(0) 编辑
摘要:官网文档:https://guides.github.com/introduction/flow/ GitHub flow is a lightweight, branch-based workflow that supports teams and projects where deploymen 阅读全文
posted @ 2020-03-26 10:35 PanPan003 阅读(276) 评论(0) 推荐(0) 编辑
摘要:原文:Code Review最佳实践 Code Review(代码审查)是软件开发中的最佳实践之一,可以有效提高整体代码质量,及时发现代码中可能存在的问题。包括像Google、微软这些公司,Code Review都是基本要求,代码合并之前必须要有人审查通过才行。 Code Review有什么好处? 阅读全文
posted @ 2020-03-26 10:07 PanPan003 阅读(313) 评论(0) 推荐(0) 编辑
摘要:原文:一文详解微服务架构,https://www.cnblogs.com/skabyy/p/11396571.html 微服务相对的是单体应用,即将所有功能都打包成在一个独立单元的应用程序。 这一阶段存在很多不合理的地方: 网站和移动端应用有很多相同业务逻辑的重复代码。 数据有时候通过数据库共享,有 阅读全文
posted @ 2020-03-25 19:51 PanPan003 阅读(1061) 评论(1) 推荐(0) 编辑
摘要:官方说明:https://classic.yarnpkg.com/zh-Hans/docs/package-json 原文地址:yarn命令的使用 name 和 version 是 package.json 文件里最重要的两个字段,没有它们你的包无法被安装。 name 和 version 字段一起用 阅读全文
posted @ 2020-03-25 11:42 PanPan003 阅读(9496) 评论(0) 推荐(0) 编辑
摘要:原文地址:https://blog.csdn.net/mangoyiy/article/details/79972759 Yarn是一个快速可靠安全的依赖管理工具。主要的三个特点: 极其快速,Yarn会缓存它下载的每个包,所以无需重复下载。它还能并行化操作以最大化资源利用率。特别安全,Yarn会在每 阅读全文
posted @ 2020-03-25 10:39 PanPan003 阅读(1113) 评论(0) 推荐(0) 编辑
摘要:官网地址:https://docs.gitlab.com/ee/api/README.html 阅读全文
posted @ 2020-03-25 10:30 PanPan003 阅读(1886) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-24 15:47 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-24 15:46 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-24 12:15 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-24 11:44 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-24 11:36 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
摘要:参考资料: Getting Started with xUnit.net _Using .NET Core with the .NET SDK command line Getting Started with xUnit.net_Using .NET Framework with Visual S 阅读全文
posted @ 2020-03-17 15:01 PanPan003 阅读(246) 评论(0) 推荐(0) 编辑
摘要:论count使用不当的罪名 和 分页的优化 阅读全文
posted @ 2020-03-12 17:20 PanPan003 阅读(267) 评论(0) 推荐(0) 编辑
摘要:https://www.postgresql.org/docs/9.5/sql-keywords-appendix.html 阅读全文
posted @ 2020-03-12 17:19 PanPan003 阅读(142) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-12 17:18 PanPan003 阅读(11) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-12 17:17 PanPan003 阅读(18) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-12 16:30 PanPan003 阅读(21) 评论(0) 推荐(0) 编辑
摘要:官方文档: https://docs.microsoft.com/zh-cn/dotnet/standard/security/secure-coding-guidelines https://docs.microsoft.com/en-us/dotnet/standard/security/sec 阅读全文
posted @ 2020-03-12 15:39 PanPan003 阅读(150) 评论(0) 推荐(0) 编辑
摘要:Moq Moq: an enjoyable mocking library The most popular and friendly mocking framework for .NET http://www.nuget.org/packages/Moq 参考资料: Mocks Aren't St 阅读全文
posted @ 2020-03-12 15:06 PanPan003 阅读(171) 评论(0) 推荐(0) 编辑
摘要://mock设置默认值 var requestMocService = new Mock<IRequestService>() ; requestMocService.DefaultValue = DefaultValue.Mock; //new RequestServiceClient(null) 阅读全文
posted @ 2020-03-12 10:35 PanPan003 阅读(2755) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-03-12 10:29 PanPan003 阅读(0) 评论(0) 推荐(0) 编辑
摘要:有时候会遇到错误Merge的情况,这种情况需要使用-m参数。 如: $ git log commit 414b65a80446********8281c4479f01 Merge: eb027*****3268 Author: CHN\user <user@****.com> Date: Wed M 阅读全文
posted @ 2020-03-09 14:11 PanPan003 阅读(328) 评论(0) 推荐(0) 编辑
摘要:Git cherry-pick $ git log --branches=*feature/v1.2* --since 2020-04-20 --until 2020-04-23 --pretty=format:"%an %h %aD %s " --reverse |grep -i "[author 阅读全文
posted @ 2020-03-06 18:33 PanPan003 阅读(765) 评论(0) 推荐(0) 编辑
摘要:原文:PostgreSQL 数据库开发规范 命名规范 强制】库名、表名限制命名长度,建议表名及字段名字符总长度小于等于63。 【强制】对象名(表名、列名、函数名、视图名、序列名、等对象名称)规范,对象名务必只使用小写字母,下划线,数字。不要以pg开头,不要以数字开头,不要使用保留字。保留字参考htt 阅读全文
posted @ 2020-03-06 18:29 PanPan003 阅读(10369) 评论(0) 推荐(0) 编辑
摘要:原文链接:C# 编码约定(C# 编程指南) 英文版:C# Coding Conventions (C# Programming Guide) Coding conventions serve the following purposes: They create a consistent look 阅读全文
posted @ 2020-03-06 18:28 PanPan003 阅读(298) 评论(0) 推荐(0) 编辑
摘要:官方文档:Install FxCop analyzers in Visual Studio 1.安装 & 设置成功 2.release版本中删除相关Dll =》项目需要放到docker中,避免每次提交image过大,降低工作效率,故仅在debug时,才加入dll。 2.2.1 方式:编辑项目文件.c 阅读全文
posted @ 2020-03-06 18:22 PanPan003 阅读(686) 评论(0) 推荐(0) 编辑
摘要:背景: 修改了configmaps之后,重启pods,Kubernetes中pods一个失败、一个runing: 分析思路: 1.查看问题pods: 1.1.表现:pods数量频繁变化:因为pods不断陷入(create-error-create)的循环。 1.2.说明: replicas设置为2。 阅读全文
posted @ 2020-03-05 18:40 PanPan003 阅读(7827) 评论(0) 推荐(0) 编辑
摘要:原文 Git Bash输错账号密码如何重新输入:https://blog.csdn.net/qq_26878363/article/details/83146567 很多时候我们容易在Git Bash操作的时候,不慎输入错误的用户名或密码,此时一直提示: remote: Incorrect user 阅读全文
posted @ 2020-03-04 10:19 PanPan003 阅读(5856) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示