1 Star 0 Fork 37

apple006 / docker-alpine

forked from aqztcom / docker-alpine 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

docker-alpine

License PRs Welcome GitHub stars GitHub forks

基于alpine系统构建docker镜像,实现可配置和易于管理的docker镜像。

项目简介

  • 提供非常小的docker镜像。
  • 提供易于配置的docker镜像。
  • 提供非常稳定的docker镜像。
  • 使用docker镜像快速启用微服务架构。
  • 使用docker镜像快速部署监控。

技术栈

快速开始

利用此镜像作为进一步构建的基础。默认情况下,它不会启动s6-overlay系统,请访问s6 overlay repository 关于如何启用S6 init系统时使用此基础或查看我的一些其他镜像的说明。

使用说明

其他地址

微信关注支持

image

  • 一起来参与完善,分享或是交流,提高工作效率!
  • 如果想分享或是交流的话,请加快捷运维QQ群:7652650
  • Email:ppabc@qq.com

配置

数据卷

下面的目录用于配置,并且可以映射为持久存储。

目录 描述
/etc/zabbix/zabbix_agentd.conf.d/ Zabbix Agent 配置目录
/assets/cron-custom 在这里删除自定义CRONTABS

环境变量

下面是可用于自定义安装的可用选项的完整列表。

参数 描述
DEBUG_MODE Enable Debug Mode - Default: FALSE
DEBUG_SMTP Setup Mail Catch all on port 1025 (SMTP) and 8025 (HTTP) - Default: FALSE
ENABLE_CRON Enable Cron - Default: TRUE
ENABLE_SMTP Enable SMTP services - Default: TRUE
ENABLE_ZABBIX Enable Zabbix Agent - Default: TRUE
TIMEZONE Set Timezone - Default: Asia/Shanghai

如果希望发送此邮件,请设置ENABLE_SMTP=TRUE,并配置以下环境变量。有关配置MSMTP的选项的进一步信息,请参见MSMTP Configuration Options

参数 描述
SMTP_HOST Hostname of SMTP Server - Default: postfix-relay
SMTP_PORT Port of SMTP Server - Default: 25
SMTP_DOMAIN HELO Domain - Default: docker
SMTP_MAILDOMAIN Mail Domain From - Default: example.org
SMTP_AUTHENTICATION SMTP Authentication - Default: none
SMTP_USER Enable SMTP services - Default: user
SMTP_PASS Enable Zabbix Agent - Default: password
SMTP_TLS Use TLS - Default: off
SMTP_STARTTLS Start TLS from within Dession - Default: off
SMTP_TLSCERTCHECK Check remote certificate - Default: off

有关下列ZabBIX值的信息,请参见Zabbix Agent文档

Zabbix 参数 描述
ZABBIX_LOGFILE Logfile Location - Default: /var/log/zabbix/zabbix_agentd.log
ZABBIX_LOGFILESIZE Logfile Size - Default: 1
ZABBIX_DEBUGLEVEL Debug Level - Default: 1
ZABBIX_REMOTECOMMANDS Enable Remote Commands (0/1) - Default: 1
ZABBIX_REMOTECOMMANDS_LOG Enable Remote Commands Log (0/1)
ZABBIX_SERVER Allow connections from Zabbix Server IP - Default: 0.0.0.0/0
ZABBIX_LISTEN_PORT Zabbix Agent Listening Port - Default: 10050
ZABBIX_LISTEN_IP Zabbix Agent Listening IP - Default: 0.0.0.0
ZABBIX_START_AGENTS How many Zabbix Agents to Start - Default: `0
ZABBIX_SERVER_ACTIVE Server for Active Checks - Default: zabbix-proxy
ZABBIX_HOSTNAME Container hostname to report to server - Default: docker
ZABBIX_REFRESH_ACTIVE_CHECKS Seconds to refresh Active Checks - Default: 120
ZABBIX_BUFFER_SEND Buffer Send - Default: 5
ZABBIX_BUFFER_SIZE Buffer Size - Default: 100
ZABBIX_MAXLINES_SECOND Max Lines Per Second - Default: 20
ZABBIX_ALLOW_ROOT Allow running as root - Default: 1
ZABBIX_USER Zabbix user to start as - Default: zabbix

如果启用DEBUG_PERMISSIONS=TRUE,所有用户和组都已根据环境变量进行修改,将在输出中显示。 例如,如果添加USER_NGINX=1000,它会将容器“nginx”用户ID从“82”重置为“1000”-提示,也将组ID更改为本地开发用户UID和GID。 避免开发时的用户许可问题。

参数 描述
USER_<USERNAME> The user's UID in /etc/passwd will be modified with new UID - Default N/A
GROUP_<GROUPNAME> The group's GID in /etc/group and /etc/passwd will be modified with new GID - Default N/A
GROUP_ADD_<USERNAME> The username will be added in /etc/group after the group name defined - Default N/A

网络

开放的端口

端口 描述
1025 DEBUG_MODE & DEBUG_SMTP SMTP Catcher
8025 DEBUG_MODE & DEBUG_SMTP SMTP HTTP Viewer
10050 Zabbix Agent

调试模式

当使用此作为基础镜像时,在启动脚本中创建语句,检查是否存在DEBUG_MODE=TRUE,并在应用程序中设置各种参数,以输出更多细节、启用调试模式等。在这个基本镜像中,它做如下操作:

  • 设置ZabBIX代理以输出冗长的日志
  • 启用MelHog邮件收集器,它用自己的CaskAdl执行替换/usr/sbin/sendmail 。它还为SMTP捕获打开端口“1025”,您可以查看它在端口“8025”处捕获的消息。

维护

通过shell进入容器

出于调试和维护的目的,您可以访问容器。

docker exec -it 你的容器名称 bash
MIT License Copyright (c) 2018 aqzt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于alpine系统构建docker镜像,实现可配置和易于管理的docker镜像。 展开 收起
Shell
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/tang006/docker-alpine.git
git@gitee.com:tang006/docker-alpine.git
tang006
docker-alpine
docker-alpine
master

搜索帮助

14c37bed 8189591 565d56ea 8189591