随笔分类 -  Docker

摘要:vi /etc/docker/daemon.json { ... "log-driver": "json-file", "log-opts": { # 日志文件最大1G "max-size": "1000m", # 日志文件数量最大为50个 "max-file": "50" }, ... } 阅读全文
posted @ 2022-09-20 00:57 LeoShi2020 阅读(60) 评论(0) 推荐(0) 编辑
摘要:# 批量tag docker images | grep metallb |awk -v OFS=':' '{print "docker tag "$1,$2" hub.leoshi.io/"$1,$2}' | sh [root@Harbor ~]# docker images | grep met 阅读全文
posted @ 2022-09-06 16:43 LeoShi2020 阅读(242) 评论(0) 推荐(0) 编辑
摘要:1. docker镜像删除报错 [root@www ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE dcm4che/slapd-dcm4chee 2.6.2-26.1 8f1f18417a82 2 months ago 12.2MB dc 阅读全文
posted @ 2022-08-31 11:06 LeoShi2020 阅读(247) 评论(0) 推荐(0) 编辑
摘要:1. 查看当前Cgroup状态 [root@master1 cluster]# docker info | grep Cgrou Cgroup Driver: cgroupfs Cgroup Version: 1 2. 修改Cgroup状态 vi /etc/docker/daemon.json { 阅读全文
posted @ 2022-08-12 23:02 LeoShi2020 阅读(97) 评论(0) 推荐(0) 编辑
摘要:1. Harbor默认subnet 172.21.0.0/16 docker network inspect harbor_harbor [ { "Name": "harbor_harbor", "Id": "15a6c2b48fb12096bf54476a2b9901b6e7cf74001cc68 阅读全文
posted @ 2022-08-11 16:12 LeoShi2020 阅读(126) 评论(0) 推荐(0) 编辑
摘要:vi /usr/lib/systemd/system/docker.service # 修改为 ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock -H fd:// --containerd=/ 阅读全文
posted @ 2021-05-25 13:58 LeoShi2020 阅读(209) 评论(0) 推荐(0) 编辑
摘要:查看该文件夹配置 grep vm.max_map_count /etc/sysctl.conf 添加配置 [root@Test elasticsearch]# echo 'vm.max_map_count=262144' >> /etc/sysctl.conf [root@Test elastics 阅读全文
posted @ 2020-12-15 11:34 LeoShi2020 阅读(1384) 评论(0) 推荐(0) 编辑
摘要:问题 [root@DB1 zabbix]# docker run -d -p 8080:8080 -p 8443:8443 --name=drawio jgraph/drawio WARNING: IPv4 forwarding is disabled. Networking will not wo 阅读全文
posted @ 2020-12-11 09:39 LeoShi2020 阅读(129) 评论(0) 推荐(0) 编辑
摘要:自定义容器报错 Dockerfile 没有给执行权限 COPY ["docker-entrypoint.sh", "/usr/bin/"] RUN chmod +x /sbin/docker-entrypoint.sh ENTRYPOINT ["/sbin/tini", "--", "/usr/bi 阅读全文
posted @ 2020-11-08 19:30 LeoShi2020 阅读(2321) 评论(0) 推荐(0) 编辑
摘要:# docker login docker.io Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.do 阅读全文
posted @ 2020-10-28 10:04 LeoShi2020 阅读(1910) 评论(0) 推荐(0) 编辑
摘要:prometheus 配置文件不同步,如果使用文件夹可以同步 docker run -d \ --name=prometheus \ -p 9090:9090 \ -v /usr/local/docker/prometheus/prometheus.yml:/etc/prometheus/prome 阅读全文
posted @ 2020-10-14 23:13 LeoShi2020 阅读(1358) 评论(0) 推荐(0) 编辑
摘要:容器和 VM 之间的差异 VM 利用 Hypervisor 虚拟化技术来模拟 CPU、内存等硬件资源,这样就可以在宿主机上建立一个 Guest OS,这是常说的安装一个虚拟机。 每一个 Guest OS 都有一个独立的内核,比如 Ubuntu、CentOS 甚至是 Windows 等,在这样的 Gu 阅读全文
posted @ 2020-08-23 13:58 LeoShi2020 阅读(403) 评论(0) 推荐(0) 编辑
摘要:安装k8s时报错 [root@master ~]# cat /etc/docker/daemon.json { "registry-mirrors": [ "https://kfwkfulq.mirror.aliyuncs.com", "https://2lqq34jg.mirror.aliyunc 阅读全文
posted @ 2020-08-11 00:05 LeoShi2020 阅读(1782) 评论(0) 推荐(0) 编辑
摘要:[root@mirrors ~]# docker run -d --name nexus3 --restart=always -p 8081:8081 -v nexus-data:/nexus-data sonatype/nexus3 WARNING: IPv4 forwarding is disa 阅读全文
posted @ 2020-07-06 20:29 LeoShi2020 阅读(238) 评论(0) 推荐(0) 编辑
摘要:CentOS8默认安装了Python36 以及 pip3 [root@Docker ~]# pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pip WARNING: Run 阅读全文
posted @ 2020-07-06 13:39 LeoShi2020 阅读(898) 评论(0) 推荐(1) 编辑
摘要:停止已经退出的Docker docker ps -a|grep "Exited" | awk '{print $1}' | xargs docker stop 删除已经退出的Docker docker ps -a|grep "Exited" | awk '{print $1}' | xargs do 阅读全文
posted @ 2020-07-01 01:15 LeoShi2020 阅读(1008) 评论(0) 推荐(0) 编辑
摘要:主要是将日志文件输出到/dev/stdout RUN curl -L http://mirrors.aliyun.com/repo/epel-7.repo -o /etc/yum.repos.d/epel-7.repo \ && yum install -y nginx \ && sed -i '/ 阅读全文
posted @ 2020-07-01 00:04 LeoShi2020 阅读(2305) 评论(0) 推荐(1) 编辑
摘要:为什么会出现Exited(0) docker 容器默认会把容器内部第一个进程,也就是pid=1的程序作为docker容器是否正在运行的依据,如果docker 容器pid挂了,那么docker容器便会直接退出。 # 末尾加入使得nginx在前台运行 CMD ["/usr/sbin/nginx","-g 阅读全文
posted @ 2020-06-30 23:56 LeoShi2020 阅读(1850) 评论(0) 推荐(0) 编辑
摘要:Docker compose部署nginx 创建配置文件 END 阅读全文
posted @ 2020-05-03 15:04 LeoShi2020 阅读(775) 评论(0) 推荐(0) 编辑
摘要:Dcoker-compose一键部署Nexus 创建配置文件 mkdir -p /opt/nexus/data chown 200:200 -R /opt/nexus/data cat > /opt/nexus/docker-compose.yml<<'EOF' version: '3.7' ser 阅读全文
posted @ 2020-04-21 16:31 LeoShi2020 阅读(354) 评论(0) 推荐(0) 编辑

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