Sign inSign up

lanycrost/alpine

By lanycrost

•Updated almost 8 years ago

Improved version of Alpine. W/s6 overlay, zabbix agent, cron, bash, curl, less, vim.

Image
1

10K+

lanycrost/alpine repository overview

⁠Improved version of Alpine

Alpine Linux

Build Status Docker Pulls Docker Stars Docker
Layers

⁠Introduction

Dockerfile to build an alpine⁠ container image.

  • Currently tracking 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8 and edge
  • 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, vim) for easier management.
  • Ability to update User ID and Group ID Permissions for Development Purposes dyanmically.

⁠Table of Contents

⁠Prerequisites

No prequisites required

⁠Installation

Automated builds of the image are available on Docker Hub⁠ and is the recommended method of installation.

docker pull lanycrost/alpine:(imagetag)

The following image tags are available:

  • 3.1 - Alpine 3.1
  • 3.2 - Alpine 3.2
  • 3.3 - Alpine 3.3
  • 3.4 - Alpine 3.4
  • 3.5 - Alpine 3.5
  • 3.6 - Alpine 3.6
  • 3.7 - Alpine 3.7
  • 3.8 - Alpine 3.8
  • edge - Alpine edge
  • latest - Alpine 3.8

⁠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
/assets/cron-customDrop Custom Crontabs here
⁠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
ENABLE_CRONEnable Cron - Default: TRUE
ENABLE_ZABBIXEnable Zabbix Agent - Default: FALSE
TIMEZONESet Timezone - Default: Asia/Yerevan

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) - Default: 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

If you enable DEBUG_PERMISSIONS=TRUE all the users and groups have been modified in accordance with Environmental Variables will be displayed in output. e.g. If you add USER_NGINX=1000 it will reset the containers nginx user id from 82 to 1000 - Hint, also change the Group ID to your local development users UID & GID and avoid Docker permission issues when developing.

ParameterDescription
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
⁠Networking

The following ports are exposed.

PortDescription
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

⁠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

⁠Authors

⁠References

Tag summary

Content type

Image

Digest

Size

18.2 MB

Last updated

almost 8 years ago

docker pull lanycrost/alpine