docker-compose

zabbix+grafana docker搭建及绘图

血红的双手。 提交于 2019-12-06 18:33:55
zabbix和grafana docker方式搭建及绘图 过程比较简单,本人比较懒,简单写写,有兴趣可以找我沟通! 开箱即用搭建zabbix及grafana 我们这里采用docker-compose方式一键搭建zabbix及grafana 下载 代码 修改docker-compose.yaml yaml配置文件中包含了zabbix,mysql,grafana等组件,修改自己的密码等信息 部署 docker-compose up -d 登录zabbix 默认登录方式为Admin/Zabbix,点击右上角修改语言和密码信息 登录grafana 默认登录方式为admin/admin 在插件管理里面启用zabbix插件 grafana导入数据源 添加mysql数据源 zabbix_mysql db:3306 Database:zabbix User:root Password: zabbix 添加zabbix数据源 URL:http://web/api_jsonrpc.php Zabbix API details:Admin/zabbix Trends:开启 Direct DB Connection:开启 Alerting:开启 导入图形模板 点击home,import dashboard 模板导入后顺利出图,完成 最后附一张成功后的图片: 来源: 51CTO 作者: Shiny_boy

“network not manually attachable” when running one-off command against docker swarm network

烂漫一生 提交于 2019-12-06 17:18:32
问题 I'm trying to run a one-off command to initialise a database schema in a new docker swarm which is deployed with 1.13's new support for docker-compose files. The swarm has the following network: $ docker network ls NETWORK ID NAME DRIVER SCOPE ... b7dptlu8zyqa vme_internal overlay swarm ... defined in the docker-compose.yml file as: networks: internal: The command I run is docker run --rm --network vme_internal app:0.1 db upgrade with the extra vme_ prefix coming from the name that I gave the

Mount a volume in docker-compose conditionally

白昼怎懂夜的黑 提交于 2019-12-06 17:00:23
问题 I have a docker-compose.yml configuration. One of the containers there is a Tomcat server and it has some default .war file deployed in webapps directory. I want to have the ability to pass (override) the war archive to be deployed by some which resides on the host machine. I think the best would be to have ability somehow switch / override starting docker-compose : as a default, I want to run the webapp ( war file) which is inside the container, but I want to have a possibility to mount a

Scaling Docker containers in Rancher with different but persistent volumes

让人想犯罪 __ 提交于 2019-12-06 16:55:34
问题 I'm currently trying to bridge the gap between persistent, but unique volumes while scaling containers with Rancher (alternatively Docker Compose, since this is more of an abstract question). Take as an example a Minecraft server, I have a Service defined in Rancher/Compose which uses a named volume as its data/world directory (e.g. -v minecraft_data:/data where the Minecraft image loads its world files from this /data directory). The reason I'm using such a named volume, is that I want it to

docker-compose gives ERROR: Cannot locate specified Dockerfile: Dockerfile

南笙酒味 提交于 2019-12-06 16:31:49
问题 I've cloned a docker setup which uses docker-compose. One remote developer confirms it works so my problem seems to be with my setup. I ran docker-compose up , but that currently gives me this: $ docker-compose up Creating volume "mycompanydocker_mysql-data" with local driver Creating volume "mycompanydocker_redis-data" with local driver Creating volume "mycompanydocker_app-data" with local driver Creating volume "mycompanydocker_mongo-data" with local driver mycompanydocker_redis_1 is up-to

Wait node.js until Logstash is ready using containers

纵然是瞬间 提交于 2019-12-06 16:18:45
I have the following setup in docker-compose.yml : .... logstash: container_name: logstash image: docker.elastic.co/logstash/logstash:6.2.4 node: container_name: node build: context: ./node/ dockerfile: ./Dockerfile depends_on: - logstash .... I'm using the package winston-logstash to wire them together. This is the transport layer: const logstashHost = process.env.LOGSTASH_HOST || 'logstash' const logstashPort = process.env.LOGSTASH_PORT || 5045 new (winstonLogstash.Logstash)({ host: logstashHost, port: logstashPort, node_name: 'node', timestamp: true, max_connect_retries: 5, timeout_connect

Docker-compose: merge/combine two containers

二次信任 提交于 2019-12-06 15:53:48
问题 I am trying to create a docker environment for my project. Let me explain. I have a project called my-project which produces a war my-project.war . I created a Docker image called my-project:latest which contains the my-project.war in the /my-project directory. That was easy. Now I want to combine the Docker images my-project:latest and tomcat:latest (which is the official Docker image for Tomcat) in docker-compose.yml . I started with this docker-compose.yml : version: "3" services: my

使用docker-compose编写常规的lnmp容器,pdo连接mysql失败。

不羁岁月 提交于 2019-12-06 15:31:52
问题的核心是yii2 是通过pdo的方式去连接数据的。但是我们通过容器去搭建lnmp环境时,nginx , php , mysql 这三个服务是独立的三个容器,彼此隔离。所以在yii2中连接mysql服务器的时候不能写"localhost" 或者 "127.0.0.1"等主机,而是你的容器名 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a8c025a080f5 nginx:latest "nginx -g 'daemon of…" 2 weeks ago Up 15 minutes 0.0.0.0:80->80/tcp nginx fafd4fd5c5e1 mysql:5.7 "docker-entrypoint.s…" 2 weeks ago Up 15 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp mysql 005721049e99 php:7.2-fpm "docker-php-entrypoi…" 2 weeks ago Up 15 minutes 0.0.0.0:9000->9000/tcp php 我的mysql 容器的容器名就叫mysql 那么我们yii2中的配置文件就应该如下写: return [ 'class' => 'yii\db\Connection',

zz胖的博客

百般思念 提交于 2019-12-06 15:17:08
<Excerpt in index | 首页摘要> docker命令总结 <The rest of contents | 余下全文> docker命令总结 查看镜像 12$ docker iamges $ docker image ls 获取镜像 1$ docker pull [镜像名称] 删除镜像 123$ docker rmi [镜像名称/id]$ dock...... <Excerpt in index | 首页摘要> docker-compose 模板文档 <The rest of contents | 余下全文> docker-compose 模板文档 模板文档是使用 Compose 的核心,涉及到的命令关键字也比较多。但大家不用担心,这里面大部分命令跟 docker run 相关参数的含义都是类似的。 默认的模板文档名称为 ...... docker-compose 命令 <Excerpt in index | 首页摘要> docker-compose 命令 <The rest of contents | 余下全文> docker-compose 命令 命令对象与格式 对于 Compose 来说,大部分命令的对象既可以是项目本身,也可以指定为项目中的服务或者容器。如果没有特别的说明,命令对象将是项目,这意味着项目中所有的服务都会受到命...... Posted by

Docker container internal vs external dns resolution issue using Traefik

谁说我不能喝 提交于 2019-12-06 15:08:48
Docker 18.06.1-ce, traefik 1.7.3, dnsmasq, Mac 10.14 I have docker-compose setup with Traefik and need to access several services from inside the docker network/containers and externally. On a linux box (with Let'sEncrypt and http redirected to https), everything works using the same FQDN for both docker container internal and external access, and I don't have to use the service names. When I run curl http://belapi.dev.biodati.test from inside the pipeline container using docker-compose exec belapi /bin/bash I get the following error (and I don't see it showing up in the Traefik access logs):