![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
docker
禅剑一如
这个作者很懒,什么都没留下…
展开
-
kibana配置x-pack
背景:基于上篇es配置x-pack一、编辑文件1 在es-docker-compose.yml配置文件中新增kibana配置 kibana01: image: docker.elastic.co/kibana/kibana:7.7.0 container_name: kibana01 environment: CERTS_DIR_KIBANA: ${CERTS_DIR_KIBANA} volumes: - ${PWD}/config/.原创 2020-07-14 15:34:54 · 2695 阅读 · 0 评论 -
es配置x-pack
环境背景:Ubuntu 20.04 LTS、es-7.7.0、docker-19.03.8、docker-compose-1.25.5参考链接:https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html一、新建文件1.1在目录/data/operations下分别创建如下3个文件1.1.1 .env文件内容# Use an es_ prefix for al.原创 2020-07-14 12:04:06 · 1316 阅读 · 0 评论 -
docker演示nginx负载均衡
背景:在上篇docker演示nginx反向代理基础上继续一、编写脚本1. 分别编写load_balancing_8000.py、load_balancing_8001.py脚本(注意脚本对应端口分别为8000、8001)#!/usr/bin/python3# -*- coding: UTF-8 -*-from flask import Flaskapp = Flask(__name__)@app.route('/api', methods=['GET'])def get_..原创 2020-06-24 11:33:13 · 132 阅读 · 0 评论 -
docker演示nginx反向代理
注:此处部分简单说明省略一、拉取镜像docker pull nginx:stable二、编写配置1. docker-compose.yml配置version: '3.1'networks: shared: external: name: sharedservices: nginx: image: nginx:stable container_name: nginx# restart: always ports:原创 2020-06-24 10:20:42 · 169 阅读 · 0 评论 -
wsl2中重启容器shell脚本
#!/bin/bashset -xset -etry_again_start() { for i in $(seq 1 4) do if [ "$i" = 4 ] then echo -e "\033[31m Too many failures, exit the program \033[0m" >&2 exit 1 fi if service docker status | grep "Docker is runn.原创 2020-06-23 10:39:37 · 662 阅读 · 0 评论 -
metricbeat收集redis日志以及系统日志
注:部分说明省略一、拉取镜像docker pull elastic/metricbeat:7.7.0二、编写metricbeat.yml配置文件metricbeat.modules: #-------------------------------- System Module -------------------------------- - module: system metricsets: - cpu # CPU usage原创 2020-06-15 19:08:29 · 846 阅读 · 0 评论 -
shell脚本创建redis集群
通过脚本创建redis集群1. 创建脚本文件redis-node-start.sh,内容如下#!/bin/bash# 方法要定义在调用的前面,否则会因找不到该方法报错createRedisClusterContainer() { echo "Start to create redis cluster" for port in $(seq 7000 7005); do docker run -d -it \ -p "${port}":"${port}" \ .原创 2020-06-11 10:14:52 · 801 阅读 · 0 评论 -
filebeat+logstash收集postgres慢查询日志
背景:在win10下docker启动postgres、python连接postgres,创建表和插入数据以及ELK+Filebeat的基础上进行一、Filebeat端处理1. 配置文件修改1.1 filebeat.yml配置文件新增数据源类型- type: log enabled: true paths: - /usr/share/filebeat/log/facilities/*/*.log tags: ["facility"] fields: en...原创 2020-05-29 17:35:30 · 1331 阅读 · 0 评论 -
win10下docker启动postgres
一、拉取镜像docker pull postgres:13二、简单版启动容器1. 执行命令启动容器docker run --name postgres -e POSTGRES_PASSWORD=1234 -p 5433:5432 -d postgres:132. 打开navicat查看结果从以上结果看出数据库连接成功3. 拷贝镜像默认配置到宿主机docker cp postgres:/var/lib/postgresql/data/postgresql.conf .原创 2020-05-28 17:17:34 · 1961 阅读 · 0 评论 -
filebeat采集udp/tcp数据
背景:在win10下docker操作filebeat做日志采集基础上进行一、配置文件1. D:\usr\local\etc\filebeat目录下docker-compose-filebeat.yml文件,新增暴露端口version: '3'services: filebeat: image: elastic/filebeat:7.6.2 container_name: filebeat volumes: - /d/usr/local/logs..原创 2020-05-19 19:33:37 · 3841 阅读 · 0 评论 -
Logstash接收udp/tcp数据
背景:在Logstash数据源为日志文件操作基础上进行一、配置文件1. D:\usr\local\etc\logstash\pipeline1目录下logstash.conf文件配置input { stdin { } udp { host => "0.0.0.0" # 从5000端口获取日志 port => 5000 type => "udp" } tcp { ..原创 2020-05-19 17:35:48 · 5135 阅读 · 0 评论 -
win10下docker启动elasticsearch-head
一、拉取镜像docker pull mobz/elasticsearch-head:5二、修改文件2.1 下载vendor.js文件https://github.com/mobz/elasticsearch-head/blob/master/_site/vendor.js2.2 修改vendor.js文件第6886行 contentType: "application/x-www-form-urlencoded改成contentType: "application/json;..原创 2020-05-15 14:42:39 · 373 阅读 · 0 评论 -
win10下docker操作filebeat做日志采集
一、 拉取镜像docker pull elastic/filebeat:7.6.2 二、编写filebeat配置文件2.1 在目录D:\usr\local\etc\filebeat下分别创建docker-compose-filebeat.yml、filebeat.yml文件2.2docker-compose-filebeat.yml文件内容version: '3'services: filebeat: image: elastic/filebeat:7.6.2 .原创 2020-05-15 14:18:20 · 827 阅读 · 0 评论 -
Logstash数据源为日志文件操作
在Springboot整合ELK基础上进行一、模拟日志1. 在D:\usr\local\bin\start目录下编写python脚本save_log.py#!/usr/bin/python# -*- coding: UTF-8 -*-import datetimeimport threadingimport os# 递归级联创建的目录path = "D:/usr/local/logs"if not os.path.exists(path): os.makedirs(p原创 2020-05-14 19:55:43 · 624 阅读 · 0 评论 -
win10下docker启动redis单机及集群
一、单机版redis1. 拉取redis镜像docker pull redis2. 执行命令,启动redisdocker run -p 6379:6379 --name redis -d redis3. 查看结果到此单机配置成功二、配置Redis集群原创 2020-05-11 17:20:37 · 927 阅读 · 0 评论 -
win10下使用docker容器启动ELK
一、安装Logstash1. 拉取logstash镜像docker pull logstash:7.6.22.3.原创 2020-05-07 11:39:13 · 1286 阅读 · 1 评论 -
win10家庭教育版安装docker
参考地址:https://itnext.io/install-docker-on-windows-10-home-d8e621997c1d安装问题:one prerequisite is not fulfilled.Docker Desktop requires Windows 10 Pro or Enterprise version 15063 to run一、安装Hyper-V 和 C...原创 2020-05-06 09:55:48 · 2854 阅读 · 1 评论 -
docker运行dubbo-admin
dokcer hub官网地址:https://hub.docker.com/r/apache/dubbo-admingithub官网地址:https://github.com/apache/dubbo-admin1. 拉取镜像docker pull apache/dubbo-admin2. 编写docker-compose-dobbo.yml文件version: '3'...原创 2019-09-10 15:13:17 · 2508 阅读 · 0 评论 -
kafka环境搭建
dockerhub 镜像地址:https://hub.docker.com/r/wurstmeister/kafkahttps://hub.docker.com/r/kafkamanager/kafka-managerhttps://hub.docker.com/r/solsson/kafka-managergithub 地址:https://github.com/wurstmeist...原创 2019-09-06 11:03:37 · 285 阅读 · 0 评论 -
docker运行kafka管理界面
dockerhub 镜像地址:https://hub.docker.com/r/solsson/kafka-manager1. 拉取镜像docker pull solsson/kafka-manager2. 运行kafka管理容器ocker run -d -p 9000:9000 solsson/kafka-manager3. 查看管理界面4. 解决问题:Yikes...原创 2019-09-05 16:10:26 · 6937 阅读 · 1 评论 -
dokcer搭建zookeeper集群
dockerhub 资料地址:https://hub.docker.com/_/zookeeper官方地址:https://zookeeper.apache.org/doc/current/zookeeperStarted.html1. 拉取镜像docker pull zookeeper2. 启动镜像(此镜像包括EXPOSE 2181 2888 3888 8080(zookeep...原创 2019-09-03 18:02:03 · 539 阅读 · 0 评论 -
ubuntu18.04.2 安装docker compose
github 资料:https://github.com/docker/compose/releases官网资料:https://docs.docker.com/compose/install/1. 执行安装命令sudo curl -L https://github.com/docker/compose/releases/download/1.25.0-rc2/docker-comp...原创 2019-09-03 10:28:49 · 237 阅读 · 0 评论 -
docker运行elasticsearch、kibana
elasticsearch docker官方地址:https://hub.docker.com/_/elasticsearchkibana docker官方地址:https://hub.docker.com/_/kibanakibana 文档:https://www.elastic.co/guide/cn/kibana/current/introduction.htmljest git...原创 2019-09-02 14:37:48 · 389 阅读 · 0 评论 -
Docker命令操作
# 查看docker版本docker --version#拉取镜像docker pull image-name | image-name:Tag# 显示所有顶层镜像docker image ls或docker images# 删除指定的IMAGE ID镜像docker rmi <IMAGE ID># 查看正在运行的容器docker p...原创 2019-08-30 13:39:38 · 109 阅读 · 0 评论 -
Ubuntu下docker使用问题集合
一、no space left on device1. 背景:拉取elasticsearch镜像时出现no space left on device2. 查看docker信息2.1 查看docker的根目录docker info或docker info | grep "Docker Root Dir"2.2. 查看根目录的磁盘占用率df -h /var/...原创 2019-08-29 09:35:21 · 149 阅读 · 0 评论 -
通过Docker容器运行RabbitMQ
docker官网:https://hub.docker.com/_/rabbitmq一、使用docker容器运行RabbitMQ1. 拉取进行docker pull rabbitmq:3-management2. 启动容器docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3-management...原创 2019-08-23 14:12:09 · 195 阅读 · 0 评论 -
docker搭建consul集群
背景:ubuntu64位18.04.1版,docker19.03.0GitHub资料:https://github.com/docker-library/docs/tree/master/consulDocker Hub镜像资料:https://hub.docker.com/_/consul一、获取镜像1. 拉取consul镜像docker pull consul2...原创 2019-08-14 10:42:58 · 357 阅读 · 0 评论 -
docker关于数据卷的操作
官网:https://docs.docker.com/storage/volumes/1. 创建数据卷docker volume create my-volume2. 查看所有数据卷docker volume ls3. 查看指定数据的信息docker volume inspect my-volume4. 删除指定数据卷docker volum...原创 2019-08-13 10:05:05 · 164 阅读 · 0 评论 -
docker操作异常集合
1. 使用数据卷启动服务时出现异常docker service create -d --replicas=4 --name devtest-service --mount source=myvol2,target=/app nginx:latest1.1 异常详情:Error response from daemon: This node is not a swarm manag...原创 2019-08-13 09:58:23 · 645 阅读 · 0 评论 -
Ubuntu18.04.2服务器安装Docker CE
官方安装教程链接地址:https://docs.docker.com/install/linux/docker-ce/ubuntu/#prerequisites前言:最近在学springboot,学到Docker部分,昨晚通过Oracle VM VirtualBox虚拟机安装了Ubuntu18.04.2系统,反复安装了几次都是在即将完成时出错,白白浪费了许多时间,幸好最后还是安装成功了,为了以...原创 2019-05-31 00:38:51 · 952 阅读 · 0 评论