Simple startup tool for docker containers.
bicti is intended as the entrypoint of a container, and provides a few helpers for systems that may require several services (for instance, fastcgi and nginx and cron and logrotate).
Its features include:
Declarative list of supported commands
Launch all demons or only a few ones
Drop into a shell instead
Depencies
bicti is written in Python; it supports all versions from 2.6 onwards. It also relies on runit (http://smarden.org/runit/) for daemon management.
Setup
In your dockerfile, add:
RUN apt-get -qqy install runit python python-pip
RUN pip install bicti && ln -s /sbin/bicti `which bicti`
ADD ./bicti.ini /etc/bicti.ini
RUN /sbin/bicti --setup
ENTRYPOINT "/sbin/bicti"
This will:
Retrieve bicti and its dependencies
Load your bicti.ini configuration file (expected at /etc/bicti.ini)
Setup all daemon startup scripts in /etc/runit
Declare bicti as your entry point.
Core concepts
Beyond a few command-line flags, most of bicti’s job is in setting up the configuration for runit.
Upon startup, bicti will:
Load its configuration file (/etc/bicti.ini)
Setup runit to start the declared services
Transfer control to runit, which handles daemon auto-restart, orphan process reaping, etc.
Usage
$ docker run my/image --help
usage: bicti.py [--config CONFIG] [--root ROOT] [-h] [--setup]
[--shell [SHELL]] [--all]
[SERVICE [SERVICE ...]]
Bicti, the docker inner setup.
positional arguments:
SERVICE Services to start (valid options: cron,uwsgi)
optional arguments:
--config CONFIG, -c CONFIG
Read configuration from CONFIG
--root ROOT Use paths relative to ROOT
-h, --help Show this help message and exit
--setup Setup the service files
--shell [SHELL] Drop to a shell (default=/bin/bash)
--all Start all services
Configuration file:
[bicti]
; Run before any service is started
setup = /sbin/my-image-setup
; Run once all services have been stopped
teardown = /sbin/my-image-cleanup
; One section per service
[cron]
; Actual command to run
command = /usr/bin/cron
; Require another service to be started first
after = syslog
[uwsgi]
command = /usr/bin/uwsgi
; Command to run before starting the service
setup_command = mkdir /var/log/uwsgi
; Special uid/gid
uid = www-data
gid = www-data
Metadata
Release files for bicti 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bicti-0.1.1.tar.gz | 5.4 kB | Without provenance | Details |
Release files / bicti-0.1.1.tar.gz
| Download URL | bicti-0.1.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3d44b6a8b725a731c76dcf82e910845f60baa9590b89ac0c8442d2260973dfe
|
|
BLAKE2b-256 checksum How to use checksums |
da799cb4eb7804ab92389eeacd58f639fdf88e90dba1c95e4f4ad6246c385f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for bicti 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.