离线安装k8s\docker微服务环境

初始化系统(脚本) 安装docker 准备好安装包: 1.下载二进制安装包 wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz 2.解压并安装 tar zxvf docker-18.06.3-ce.tgz cp docker/* /usr/bin/ ### 注册为服务 [root@xkdl<a href="http://yw8.tech/tag/k8s/" title="查看 [阅读全文]

安装docker脚本

Dabin10 proxmox安装指定版本docker 指定版本 export docker_version=18.09.9; apt-get remove docker docker-engine docker.io containerd runc -y; apt-get -y install apt-transport-https ca-certificates curl software-properties-common bash-completion gnupg-agent; curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | apt-key add - add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable" apt-get update apt-cache madison docker-ce install_version=$( apt-cache madison docker-ce | grep ${docker_version} | [阅读全文]

DOCKER学习

一、宿主机操作系统安装Ubuntu16.04 Centos 7.4 (需调驱动) 升级内核到4.4可选 rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm ;yum --enablerepo=elrepo-kernel install kernel-lt-devel kernel-lt -y #查看默认启动顺序 awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg CentOS Linux (4.4.4-1.el7.elrepo.x86_64) 7 (Core) [阅读全文]

DOCKER安装搭建ghost博客

记录一下简单过程 1.安装 docker curl -fsSL https://get.<a href="http://yw8.tech/tag/docker/" title="查看与 docker 相关的文章" target="_blank">docker</a>.com/ | sh 链接在github或者使用 apt install docker.io 进行安装 2.安 [阅读全文]

Dockerfile实现修改docker容器hosts文件内容的方法

http://blog.realjf.com/archives/62 root@ycyl01:~/xkmicroservice/tm-registry# cat Dockerfile #pull down OS image FROM harbor.xikang.com/microservice/openjre8-base:v3 #copy src into image ADD ./tm-registry/ /opt/tm-registry ADD ./myhosts /opt/tm-registry/ WORKDIR /opt/tm-registry/ ENTRYPOINT ["./start.sh"] root@ycyl01:~/xkmicroservice/tm-registry# cat tm-registry/start.sh #!/bin/bash hostname=`hostname` cat myhosts >> /etc/hosts nohup java -jar xk-cloud-tm-registry-1.0-SNAPSHOT.jar --spring.profiles.active=prod > /opt/logs/$hostname.log 2>&1 & tail -f /opt/logs/$hostname.log root@ycyl01:~/xkmicroservice/tm-registry# cat tm-registry.yaml --- kind: Deployment apiVersion: extensions/v1beta1 metadata: name: tm-registry spec: replicas: 2 template: metadata: labels: name: tm-registry spec: containers: - name: tm-registry image: [阅读全文]

centos的基础镜像

在198上,解决中文乱码和程序时区的问题 root@rancher01:~/centos7<a href="http://yw8.tech/tag/docker/" title="查看与 docker 相关的文章" target="_blank">docker</a># cat Dockerfile # Docker file for date and locale set # VERSION 0.0.3 #基础镜像 FROM centos:7 #定 [阅读全文]

docker安装ELK和一些注意事项

环境介绍 Centos 7.2 + Docker 17.09.0-ce + Elasticsearch 5.6.3 + elasticsearch-head 5 拉取镜像 docker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.3 docker pull mobz/elasticsearch-head:5 配置文件 elsasticsearch es1.yml cluster.name: “dali” node.name: node1 node.master: true node.data: true head插件设置 http.cors.enabled: true http.cors.allow-origin: “*” 关闭X-Pack xpack.security.enabled: false network.host: 0.0.0.0 discovery.zen.minimum_master_nodes: 1 es2.yml cluster.name: “dali” node.name: node2 [阅读全文]

docker磁盘空间清理

清理日志脚本 #!/bin/sh echo “==================== start clean docker containers logs ==========================” logs=$(find /var/lib/docker/containers/ -name *-json.log) for log in $logs do echo “clean logs : $log” cat /dev/null > $log done echo “==================== end clean docker containers logs ==========================” 我们在使用docker的过程中发现基于swarm使用St [阅读全文]

docker部署3节点ELK集群

一、安装elasticsearch集群 3个节点执行: apt-get install openjdk-8-jdk docker pull elasticsearch:6.4.2 cat /etc/sysctl.conf 加一行 vm.max_map_count=655360 root@k8s01b:/data/<a href="http://yw8.tech/tag/elk/" title="查看与 elk 相关的文章" target="_blank">elk</a># cat es1.yml #集 [阅读全文]

filebeat + elk(docker容器日志收集方案)

https://www.jianshu.com/p/7f404e804463 filebeat 5.3.1 结合 rancher 和 data-volume 实现横向扩展 ELK Stack 6.x with docker 关于集群化可参考 :http://www.jianshu.com/p/9dfac37885cb http://blog.csdn.net/qq_39284787/article/details/78874132 http://blog.csdn.net/Raptor/article/details/77622114 用Do [阅读全文]