Sign inSign up

rusxakep/alpine

By rusxakep

•Updated about 5 years ago
Archived

Docker Alpine Linux base images

Image
0

10K+

rusxakep/alpine repository overview

⁠github.com/rusxakep/docker-alpine

GitHub release Build Status Docker Stars Docker Pulls Become a sponsor Paypal Donate


⁠About

Dockerfile to build an alpine⁠ linux container image.

  • Currently tracking 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and edge.
  • s6 overlay⁠ enabled for PID 1 init capabilities.
  • zabbix-agent⁠ 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.
  • Ability to update User ID and Group ID permissions for development purposes dynamically.

⁠Maintainer

⁠Table of Contents

⁠Prerequisites and Assumptions

No prerequisites required

⁠Installation

⁠Build from Source

Clone this repository and build the image with docker build <arguments> (imagename) .

⁠Prebuilt Images

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

docker pull rusxakep/alpine:(imagetag)

The following image tags are available along with their tagged release based on what's written in the Changelog⁠:

Alpine versionTag
edge:edge
3.13:3.13
3.12:3.12
3.11:3.11
3.10:3.10
3.9:3.9
3.8:3.8
3.7:3.7
3.6:3.6
3.5:3.5
⁠Multi Archictecture

Images are built primarily for amd64 architecture, and may also include builds for arm/v6, arm/v7, arm64 and others. These variants are all unsupported. Consider sponsoring⁠ my work so that I can work with various hardware. To see if this image supports multiple architecures, type docker manifest (image):(tag)

⁠Configuration

⁠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.

⁠Persistent Storage

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.

⁠Container Options
ParameterDescriptionDefault
COLORIZE_OUTPUTEnable/Disable colorized console outputTRUE
CONTAINER_LOG_LEVELControl level of output of container INFO, WARN, NOTICE, DEBUGDefault NOTICE
DEBUG_MODEEnable debug modeFALSE
ENABLE_CRONEnable CronTRUE
ENABLE_LOGROTATEEnable Logrotate (if Cron enabled)TRUE
ENABLE_SMTPEnable SMTP servicesTRUE
ENABLE_ZABBIXEnable Zabbix AgentTRUE
SKIP_SANITY_CHECKDisable container startup routine checkFALSE
TIMEZONESet TimezoneEtc/GMT

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

⁠SMTP Options
ParameterDescriptionDefault
SMTP_AUTO_FROMAdd setting to support sending through Gmail SMTPTRUE
SMTP_HOSTHostname of SMTP Serverpostfix-relay
SMTP_PORTPort of SMTP Server25
SMTP_DOMAINHELO Domaindocker
SMTP_MAILDOMAINMail Domain Fromlocal
SMTP_AUTHENTICATIONSMTP Authenticationnone
SMTP_USEREnable SMTP servicesuser
SMTP_PASSEnable Zabbix Agentpassword
SMTP_TLSUse TLSoff
SMTP_STARTTLSStart TLS from within sessionoff
SMTP_TLSCERTCHECKCheck remote certificateoff

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

⁠Zabbix Options
ParameterDescriptionDefault
ZABBIX_LOGFILELogfile location/var/log/zabbix/zabbix_agentd.log
ZABBIX_LOGFILESIZELogfile size1
ZABBIX_DEBUGLEVELDebug level1
ZABBIX_REMOTECOMMANDS_ALLOWEnable remote commands*
ZABBIX_REMOTECOMMANDS_DENYDeny remote commands
ZABBIX_REMOTECOMMANDS_LOGEnable remote commands Log (0/1)1
ZABBIX_SERVERAllow connections from Zabbix server IP0.0.0.0/0
ZABBIX_LISTEN_PORTZabbix Agent listening port10050
ZABBIX_LISTEN_IPZabbix Agent listening IP0.0.0.0
ZABBIX_START_AGENTSHow many Zabbix Agents to start3
ZABBIX_SERVER_ACTIVEServer for active checkszabbix-proxy
ZABBIX_HOSTNAMEContainer hostname to report to serverdocker
ZABBIX_REFRESH_ACTIVE_CHECKSSeconds to refresh Active Checks120
ZABBIX_BUFFER_SENDBuffer Send5
ZABBIX_BUFFER_SIZEBuffer Size100
ZABBIX_MAXLINES_SECONDMax Lines Per Second20
ZABBIX_ALLOW_ROOTAllow running as root1
ZABBIX_USERZabbix user to start aszabbix

If you enable DEBUG_PERMISSIONS=TRUE all the users and groups have been modified in accordance with environment 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.

⁠Permissions
ParameterDescription
USER_<USERNAME>The user's UID in /etc/passwd will be modified with new UID
GROUP_<GROUPNAME>The group's GID in /etc/group and /etc/passwd will be modified with new GID
GROUP_ADD_<USERNAME>The username will be added in /etc/group after the group name defined
⁠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.

bash docker exec -it (whatever your container name is) bash

⁠Support

These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.

⁠Usage
⁠Bugfixes
  • Please, submit a Bug Report⁠ if something isn't working as expected. I'll do my best to issue a fix in short order.
⁠Feature Requests
  • Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
  • Consider sponsoring me⁠ regarding development of features.
⁠Updates
  • Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
  • Consider sponsoring me⁠ for up to date releases.

⁠License

MIT. See LICENSE⁠ for more details.

⁠References

Tag summary

Content type

Image

Digest

Size

17.3 MB

Last updated

about 5 years ago

docker pull rusxakep/alpine