docker-compose

Docker以及DockerHub的使用

妖精的绣舞 提交于 2020-01-19 02:43:58
文章目录 Docker的环境安装 移除旧版本的docker 更新apt安装包索引 安装docker 测试是否安装成功 不使用sudo启动docker 安装docker-compose 创建仓库 创建Dockerfile文件 纯命令行 c++编译生成的执行文件 构建镜像 运行镜像 登录 推送镜像 在其他电脑使用镜像 拉取镜像 运行镜像 使用docker-compose 编写docker-compose.yml 构建 运行 在浏览器中管理镜像 创建用户 连接本地docker环境 查看镜像状态 Docker的环境安装 移除旧版本的docker $ sudo apt-get remove docker docker-engine docker.io docker-ce 更新apt安装包索引 $ sudo apt-get update 安装docker $ wget -qO- https://get.docker.com/ | sh 测试是否安装成功 $ sudo docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. 不使用sudo启动docker $ sudo groupadd docker $ sudo

20200117笔记

霸气de小男生 提交于 2020-01-17 21:49:20
23.5 jumpserver介绍 23.6 安装jumpserver 23.7 登录jumpserver 23.8 用户管理 23.9 资产管理 23.10 客户端登录jumpserver 一、jumpserver介绍 官网www.jumpserver.org Jumpserver是一款使用Python, Django开发的开源跳板机系统, 助力互联网企业高效 用户、资产、权限、审计 管理 Auth 统一认证 CMDB 资产管理 统一授权 日志审计 自动化运维(ansible) 最新版v0.4.0,基于python3.6, django 1.11,目前还未开发完成,所以我们接下来将要安装v0.3.2 二、安装jumpserver yum install -y docker //首先安装docker systemctl enable docker systemctl start docker //启动docker服务 curl -L https://github.com/docker/compose/releases/download/1.17.0-rc1/docker-compose- uname -s - uname -m > /usr/local/bin/docker-compose //安装docker-compose chmod 755 /usr/local/bin

使用gcplot 查看jvm gc 信息

大城市里の小女人 提交于 2020-01-17 14:55:06
gcplot 是一个灵活强大的jvm gc 查看,分析工具,方便的数据管理以及基于时间的数据筛选 以下是一个简单的学习 官方推荐的运行方式是使用docker,所以使用docker-compose 运行 环境准备 docker-compose 文件 version: "3" services: app: image: gcplot/gcplot:latest ports: - "8080:80" 启动 docker-compose up -d 使用 web 界面 默认账户 admin admin 上传gc log 文件 配置时区 这个是可选的,但是推荐修改为自己系统配置的,比如中国一般是东八区 查看gc 信息 概述信息 不同代的内存信息 young headp 说明 从官方文档看到gcplot 好久没有大的更新了,但是还是一个很不错的工具,同时可以集成connector 做到方便的应用gc分析,以下是agent 模式的图 参考资料 https://github.com/dmart28/gcplot https://gcplot.com/ 来源: https://www.cnblogs.com/rongfengliang/p/12205416.html

使用docker和docker-compose搭建Nexus私服

此生再无相见时 提交于 2020-01-17 14:49:43
在docker官方仓库中找到nexus镜像 docker官方仓库网址:https://hub.docker.com 我使用的 nexus3(点击可以跳转到docker官方镜像对应的网址) 镜像 nexus3会大概使用1G内存,加载过程较慢(对于电脑配置而言),会出现 搭建环境 centos7+docker+docker-compose+nexus3 详细搭建步骤 下载nexus3镜像 docker pull sonatype/nexus3 使用docker命令运行nexus3 docker run -d -p 8081:8081 --name nexus3 sonatype/nexus3 访问nexus3服务 http://192.168.145.137:8081/ 至此,nexus3服务就以及搭建完成。 但是在大多数情况下我们不使用docker命令直接启动docker镜像,会使用docker-compose。 使用docker-compose启动nexus3镜像 docker-compose.yml version : '3' services : nexus3 : image : sonatype/nexus3 container_name : nexus3 restart : always ports : - 8081 : 8081 volumes : - /usr

Shipyard not showing containers after docker daemon switch to TCP port

不问归期 提交于 2020-01-17 13:47:10
问题 I've switched docker daemon to listen on TCP port (more here). Docker command (cli) is already working, but when I run shipyard with this docker-compose I don't see any image which was visible before. Should I change something in the docker-compose or this won't work ever? Thanks 回答1: Solution was to configure the service (in my case on CentOs) creating file /etc/systemd/system/docker.service.d/override.conf with content [Service] ExecStart= ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0

Shipyard not showing containers after docker daemon switch to TCP port

只愿长相守 提交于 2020-01-17 13:47:02
问题 I've switched docker daemon to listen on TCP port (more here). Docker command (cli) is already working, but when I run shipyard with this docker-compose I don't see any image which was visible before. Should I change something in the docker-compose or this won't work ever? Thanks 回答1: Solution was to configure the service (in my case on CentOs) creating file /etc/systemd/system/docker.service.d/override.conf with content [Service] ExecStart= ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0

[转帖]是否值得付费?Oracle,Open JDK等四大JVM性能全面对比

吃可爱长大的小学妹 提交于 2020-01-17 07:52:29
是否值得付费?Oracle,Open JDK等四大JVM性能全面对比 https://blog.csdn.net/weixin_45583158/article/details/100143505 不通的jdk的性能是不一样的. 导读:随着Java 11 的发布,Oracle JDK成为收费软件,很多公司转向寻找Oracle JDK的替代品。有很多人都会怀疑,Oracle JDK和其他JDK之间有没有很大的性能差异,本文作者通过多方面测试,给出这个问题的答案,适合Java程序员研读。 市面上可供选择的JVM发行版还是有不少的。选择合适的JVM需要考虑不同的因素。性能是其中一个重要的因素。靠谱的性能研究是很困难的。在本文中,我创建了一个测试,在不同的JVM上执行对比测试。测试程序包括Spring Boot REST应用,使用Prometheus监控JVM并使用Grafana可视化。下图是示意图。除了soapui外,所有东西都在docker容器中运行。 隔离干扰因素 如何确定没有别的因素干扰你的设施。我们可以通过尝试隔离分配给流程的资源来实现。 例如,分配专用CPU和固定数量的内存。 我还进行了几项测试,这些测试将资源限制放在负载均衡器,监控软件和可视化软件上(为这些资源分配不同的CPU和内存)。 为进程分配特定资源(使用docker-compose v2 cpuset和内存参数

how to get api gateway address in order to call it from angular container in docker compose

隐身守侯 提交于 2020-01-17 06:55:35
问题 i have a docker compose file in which there are several containers among which there are an api gateway and another one with an angularjs application (the website of this stack). The api gateway is concerned to call correct apis of several containers presents in the compose file. But i need to call the api gateway from the website (angular container) and i would like to know what is the best practices for get the address of the api gateway container in order to call it from angular container

How dynamic map service name to ENV var

与世无争的帅哥 提交于 2020-01-17 06:24:05
问题 Example: my-server: image: my-server:latest ports: - 1234:1234 proxy: image: lb:latest environment: - BACKEND=${VAR}??? # must be resolve as 'my-server' The server name can be changed to any name, but the proxy has a entry-point script where the variable will be substituted in the BACKEND to config. 回答1: You can use a .env file to define your variable. This file will be placed in the same directory as your docker-compose.yml file. When you run docker-compose , it will read this value and use

AspNetCore结合Redis实践消息队列,从此放心安全迭代

两盒软妹~` 提交于 2020-01-16 23:12:25
引言   熟悉 TPL Dataflow 博文的朋友可能记得这是个单体程序,使用TPL Dataflow 处理工作流任务, 在使用Docker部署的过程中, 有一个问题一直无法回避: 在单体程序部署的瞬间(服务不可用)会有少量流量无法处理;更糟糕的情况下,迭代部署的这个版本有问题,上线后无法运作, 更多的流量没有得到处理。 背负神圣使命(巨大压力)的程序猿心生一计, 为何不将单体程序改成分布式:增加服务ReceiverApp只接收数据,服务WebApp只处理数据。 知识储备 消息队列和订阅发布作为老生常谈的两个知识点被反复提及,按照JMS的规范, 官方称为点对点(point to point,message queue) 和 订阅发布(publish/subscribe,channel / topic ) 点对点   消息生产者生产消息发送到Message Queue中,然后消费者从队列中取出消息并消费。 队列会保留消息,直到他们被消费或超时; ① MQ 支持多消费者,每个消息只能被一个消费者处理 ② 消息发送者和消费者在时间上没有依赖性 ,当发送者发送消息之后, 不管消费者有没有在运行(甚至不管有没有消费者),都不会影响到消息被发送到队列 ③ 一般消费者在消费之后需要向队列应答成功 如果希望发送的消息都被处理,或只能被处理一次,你应该使用p2p模型。 发布/订阅