Sign inSign up

starlightpro/alpine

By starlightpro

•Updated almost 9 years ago

Image
0

141

starlightpro/alpine repository overview

Dockerfile to build an alpine⁠ container image.

  • 3.6
  • s6 overlay⁠ enabled for PID 1 Init capabilities
  • zabbix-agent⁠ based on 3.4.x compiled for individual container monitoring.
  • Cron installed along with other tools (bash,curl, less, logrotate, nano, vim) for easier management.
  • MSMTP enabled to send mail from container to external SMTP server.

⁠Quick Start

Utilize this image as a base for further builds. By default it does not start the S6 Overlay system, but Bash. Please visit the s6 overlay repository⁠ for instructions on how to enable the S6 Init system when using this base or look at some of my other images which use this as a base.

⁠Configuration

⁠Data-Volumes

The following directories are used for configuration and can be mapped for persistent storage.

DirectoryDescription
/etc/zabbix/zabbix_agentd.conf.d/Zabbix Agent Configuration Directory
⁠Environment Variables

Below is the complete list of available options that can be used to customize your installation.

ParameterDescription
DEBUG_MODEEnable Debug Mode - Default: FALSE
DEBUG_SMTPSetup Mail Catch all on port 1025 (SMTP) and 8025 (HTTP) - Default: FALSE
ENABLE_CRONEnable Cron - Default: TRUE
ENABLE_SMTPEnable SMTP services - Default: TRUE
ENABLE_ZABBIXEnable Zabbix Agent - Default: TRUE
TIMEZONESet Timezone - Default: America/Vancouver

If you wish to have this send mail, set ENABLE_SMTP=TRUE and configure the following environment variables. See the MSMTP Configuration Options⁠ for further information on options to configure MSMTP

ParameterDescription
SMTP_HOSTHostname of SMTP Server - Default: postfix-relay
SMTP_PORTPort of SMTP Server - Default: 25
SMTP_DOMAINHELO Domain - Default: docker
SMTP_MAILDOMAINMail Domain From - Default: example.org
SMTP_AUTHENTICATIONSMTP Authentication - Default: none
SMTP_USEREnable SMTP services - Default: user
SMTP_PASSEnable Zabbix Agent - Default: password
SMTP_TLSUse TLS - Default: off
SMTP_STARTTLSStart TLS from within Dession - Default: off
SMTP_TLSCERTCHECKCheck remote certificate - Default: off

See The Official Zabbix Agent Documentation⁠ for information about the following Zabbix values

Zabbix ParametersDescription
ZABBIX_LOGFILELogfile Location - Default: /var/log/zabbix/zabbix_agentd.log
ZABBIX_LOGFILESIZELogfile Size - Default: 1
ZABBIX_DEBUGLEVELDebug Level - Default: 1
ZABBIX_REMOTECOMMANDSEnable Remote Commands (0/1) - Default: 1
ZABBIX_REMOTECOMMANDS_LOGEnable Remote Commands Log (0/1)
ZABBIX_SERVERAllow connections from Zabbix Server IP - Default: 0.0.0.0/0
ZABBIX_LISTEN_PORTZabbix Agent Listening Port - Default: 10050
ZABBIX_LISTEN_IPZabbix Agent Listening IP - Default: 0.0.0.0
ZABBIX_START_AGENTSHow many Zabbix Agents to Start - Default: `3
ZABBIX_SERVER_ACTIVEServer for Active Checks - Default: zabbix-proxy
ZABBIX_HOSTNAMEContainer hostname to report to server - Default: docker
ZABBIX_REFRESH_ACTIVE_CHECKSSeconds to refresh Active Checks - Default: 120
ZABBIX_BUFFER_SENDBuffer Send - Default: 5
ZABBIX_BUFFER_SIZEBuffer Size - Default: 100
ZABBIX_MAXLINES_SECONDMax Lines Per Second - Default: 20
ZABBIX_ALLOW_ROOTAllow running as root - Default: 1
ZABBIX_USERZabbix user to start as - Default: zabbix
⁠Networking

The following ports are exposed.

PortDescription
1025DEBUG_MODE & DEBUG_SMTP SMTP Catcher
8025DEBUG_MODE & DEBUG_SMTP SMTP HTTP Viewer
10050Zabbix Agent

⁠Debug Mode

When using this as a base image, create statements in your startup scripts to check for existence of DEBUG_MODE=TRUE and set various parameters in your applications to output more detail, enable debugging modes, and so on. In this base image it does the following:

  • Sets zabbix-agent to output logs in verbosity
  • Enables MailHog mailcatcher, which replaces /usr/sbin/sendmail with it's own catchall executible. It also opens port 1025 for SMTP trapping, and you can view the messages it's trapped at port 8025

⁠Maintenance

⁠Shell Access

For debugging and maintenance purposes you may want access the containers shell.

docker exec -it (whatever your container name is e.g. alpine) bash

Tag summary

Content type

Image

Digest

Size

8.2 MB

Last updated

almost 9 years ago

docker pull starlightpro/alpine