Saravanan666/pypi-org huggingface dataset:
Package: docker-banner-gen
Thedocker-banner-gencommand-line tool allows you to generatebash.bashrcfiles to be used within Docker containers.
It is based on TensorFlow’sbash.bashrcand uses pyfiglet to
generate the banner.Changelog0.0.7 (2021-04-09)using the stringnin the banner signals a line break0.0.6 (2020-07-24)escaping ` and now in the banner text0.0.5 (2020-07-01)fixed parse variable for outputting font info0.0.4 (2020-06-09)added option for specifying the width of the banner (-w,–width)added option to list available fonts (-L,–list_fonts)added option to output information about font (-F,–print_font_info)0.0.3 (2020-06-09)added ability to add a subtitle (placeholder{SUBTITLE}) using-s, –subtitle,
which can be used for a version numberadded-i, –print_templatesoption to output templates and the supported placeholders0.0.2 (2020-06-07)fixed entry point of console script0.0.1 (2020-06-07)initial release
Package: docker-bash-volume-watcher
This fork takes merofeev’sdocker-windows-volume-watcherand makes it work with Bash for Windows (aka Ubuntu on Windows)The script monitors directory bindings of Docker containers on Windows hosts and notifies containers about file changes.The script aims to be workaround for the problem of file change events propagation on Windows hosts. Due to limitations of CIFS implementation in Linux kernel, file change events in mounted folders of host are not propagated to container by Docker for Windows. This problem renders watch mode of modern frameworks (e.g. Jekyll, ng-cli, etc.) development servers useless, since containers are not notified about file changes. This problem is described onDocker Community Forums.InstallationThis script can be installed with pip (both Python 2 & 3 are supported).pip install docker-bash-volume-watcherUsageMonitor all directory bindings of all containers. The script will listen for container start/stop events and notify all running containers about file changes.docker-volume-watcherMonitor only bindings of containercontainer_name.docker-volume-watcher container_nameMonitor only binding ofcontainer_namein sub directory/not_node_modules.docker-volume-watcher container_name /not_node_modulesYou can also specify wildcards with*and?characters. For example: monitor only bindings of containers with names containingmyproject.docker-volume-watcher *myproject*Use flag-vto enable verbose output: the script will report start/stop events of eligible containers and print all detected file changes.LimitationsThe script doesn’t propagate to container file deletion events.The script requiresstatandchmodutils to be installed in container (this should be true by default for the most of containers).Implementation detailsThe script useswatchdogpackage to observe file change events of the host directory. Once file change event is fired the script reads file permissions of changed file (usingstatutil) and rewrites file permissions with the same value (usingchmodutil) thus triggering inotify event inside container.“Rewrite file permissions approach” was used instead of updating file last modified time withtouchutil. Since touching will cause event loop: touch will trigger file change event in Windows, script will handle this event and touch file again, etc.
Package: docker-build-ami
docker-build-amiBuild Amazon EC2 AMI image using a DockerfileLimitationsOnly supports instructions ENV, RUN, COPY and ADD, other instructions will just be ignored.ConfigurationThere is a separate config file for the script in either “/etc/docker-build-ami.conf” or “~/.docker-build-ami.conf”.# Temporary directory
# tmp_dir = /tmp

# Name tag for host building AMI image
# host_tag = docker-build-ami

# Region
# region = eu-west-1

# Instance type
# instance_type = m3.medium

# Subnet ID
# subnet_id = subnet-123abc45

# AWS access key id
# aws_access_key_id = DFSDF3HGDF4SDSD1DDFF

# AWS secret access key
# aws_secret_access_key = 3riljdsf5SDFSDvsdfds452sdSDFDfsdf44SDFdRUsageusage: docker-build-ami [-h] [-c CONFIG] [-d] [-r] [-t] [-s] [-n] [-i] [-u]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                    Configuration file
  -d, --debug           Print debug info
  -r, --region          AWS region
  -t, --instance-type   EC2 instance type
  -s, --subnet-id       AWS subnet id
  -n, --image-name      Target AMI image name
  -i, --image-id        Source AMI image ID
  -u, --image-user      AMI image user
Package: docker_builder
Docker BuilderBuild script to create containers, tag them and push them to a remote repository.Installpipinstalldocker-builderUsagedocker-builder[-f<builder.yaml>][--no-push][--no-cache][<container>...]Config fileIt expects a config file inyamlformat in the current folder namedbuilder.yaml.Formatregistries:-registry:https://index.docker.io/v1/username:userpassword:passemail:email-registry:localusername:127.0.0.1:5000containers:-container1-container2-container3RegistriesEach of the containers will be tagged and pushed to each of the registries with thelatesttag.If registry islocal, no login will be attempted and the container will be pushed to the local registry as defined in the username.
If registry is anhttp/httpsbased registry, theusername,passwordandemailwill be used to login.ContainersThecontainersattribute defines a list of containers and the order in which they will be built. It effectively defines the dependencies among containers and ensure the “source” ones are built first.Each of the containers defined in the list must be defined in a matching name folder.
Package: docker-check
docker-checkA small Python utility that tries to check if we are inside a Docker
container.Supports Linux and Windows containers.Installationpipinstall-egit+https://github.com/night-crawler/docker-check.git@HEAD#egg=docker-check# ORpipinstalldocker-checkUsagefromdocker_checkimportcheckerifchecker.is_inside_container():print('Inside container')else:print('Not inside container')
Package: docker-cleaner
docker-cleanerDescriptionThis utility is designed for cleaning up docker resources.Installationpython setup.py installorpip install-e.orpip installdocker-cleanerHow to useRundocker-cleanerimages-t120-o120-fimages--images-includefoo-imagebar-image--prunecontainers volumes-u-ldocker-cleanr.logAlso checkout list ofargumentsargumentsresources- List of resources for removing. Choose from:images,volumes,all-f,--force- Force removing of resources. Choose from:images,volumes,all-u,--untagged- Remove untagged images-v,--client-version- Version of docker client to use-o,--older- Clear resources that older amount of time (in minutes)--images-include- Filter images that only contains any of that names--volumes-include- Filter volumes that only contains any of that name--images-exclude- Exclude images that contains any of that names--volumes-exclude- Exclude volumes that contains any of that name-p,--prune- Prune specified resources. Choose from:containers,images,volumes,all-t,--timeout- Timeout of cleaning. Live it empty in case of using cron job.--loglevel- Logging level. Choose from:CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET-l,--log- Redirect logging to file
Package: docker-cli
Docker-cliA straight forward tool to get information from docker command line and try to parse into json format as far as possible.Why not docker api?The api schema might change and response data might change so often.Docker-cli uses docker cli to get response and try to format them into json formatInstallationpip install docker-cliMain methodsis_docker_set()to verify docker installation and availabilitydocker_cli.is_docker_set()To run docker commandsRequest:docker_cli.docker("ps")ResponseStructure:DockerResponse(command='docker ps',status='SUCCESS',type='JSON',data=[<JSONData>])To run docker commandsRequest:docker_cli.docker_compose("up -d")ResponseStructure:Similarasthatofdockercommands
Package: docker-cluster-controller
Docker Cluster ControllerThis project provides a 'clustercontroller' package which can be used to create a docker-entrypoint.In complex docker swarm setups the order in which containers are started cannot be controlled (depends_on). When there
is a need to have different actions depening on boot order this has to be handled during initialisation of the
container.The clustercontroller package provides a class which can be used in a docker-entrypoint.In the docker-entrypoint multiprocessing is used through methods provided by the package to start two main processes:ClusterController processThe actual service the container needs to provideBoth processes are registered and actively monitored. If one of both processes (unexpectedly) terminates the other
is gracefully terminated using terminate signals.The ClusterController registers the instance in ETCD and tries to aquire a master role. Depending on the boot order
of containers it will either get the master role or become slave.Depending on the role methods are executed during initialisation, during it's lifecycle any state transfer will also
call appropriate actions for handling these events.During startup of the controller 'scheduled' jobs can be registered for example to perform hourly actions. It is
important to only use multiprocessing task using the 'start_process' method within these time based methods to 'freeze'
any other processes.Installation:pip install docker-cluster-controllerUsage:Build a container with a docker-entrypoint using the clustercontroller. See the docker-entrypoint.py as and example implementation.Start a ETCD Cluster, seedocker-service-discoveryIn the docker-compose file set environment variables so the clustercontroller knows where and how to registerEnvironment VariableDescriptionETCD_HOSTSThe hostnames of the ETCD node (comma seperated)ETCD_PORTThe port of the ETCD nodePORTS_WHEN_ACTIVEThe port(s) when de service has become active (e.g. 80,443,8443)ENVIRONMENT:A single ETCD node can be used for multimple environments, therefore the environment has to be specified. E.g. development'SERVICE:The name of the serviceBackup:To use the rotating backup functionality some environemnt variables have to be set:Environment VariableDescriptionBACKUP_HOURS_TO_KEEP=24The number of hourly backups to keepBACKUP_DAYS_TO_KEEP=14The number of daily backups to keepBACKUP_WEEKS_TO_KEEP=4The number of weekly backups to keepBACKUP_MONTHS_TO_KEEP=3The number of monthly backups to keepBACKUP_DESTINATION_FOLDER=backupThe backup destination folderWithin a scheduled method the backup can be called:run_backup(name='myapp_backup',command=['backup_command','-x','some_option','-y','some_other_option'])Filesystem locksWhen starting the controller a tuple with some file system paths can be specified. The controller then make sures a
lockfile is created for the current container in the path(s) specified.self.filesystem_locks=('backup',)The 'get_filesystem_lock' method will return True if the current container has a lock for the path or False if another
container has a lock in place.self.get_filesystem_lock('backup')
Package: docker-compose
Docker ComposeDocker Compose is a tool for running multi-container applications on Docker
defined using theCompose file format.
A Compose file is used to define how the one or more containers that make up
your application are configured.
Once you have a Compose file, you can create and start your application with a
single command:docker-compose up.Compose files can be used to deploy applications locally, or to the cloud onAmazon ECSorMicrosoft ACIusing
the Docker CLI. You can read more about how to do this:Compose for Amazon ECSCompose for Microsoft ACIWhere to get Docker ComposeWindows and macOSDocker Compose is included inDocker Desktopfor Windows and macOS.LinuxYou can download Docker Compose binaries from therelease pageon this repository.Using pipIf your platform is not supported, you can download Docker Compose usingpip:pip install docker-composeNote:Docker Compose requires Python 3.6 or later.Quick StartUsing Docker Compose is basically a three-step process:Define your app's environment with aDockerfileso it can be
reproduced anywhere.Define the services that make up your app indocker-compose.ymlso
they can be run together in an isolated environment.Lastly, rundocker-compose upand Compose will start and run your entire
app.A Compose file looks like this:services:web:build:.ports:-"5000:5000"volumes:-.:/coderedis:image:redisYou can find examples of Compose applications in ourAwesome Compose repository.For more information about the Compose format, see theCompose file reference.ContributingWant to help develop Docker Compose? Check out ourcontributing documentation.If you find an issue, please report it on theissue tracker.ReleasingReleases are built by maintainers, following an outline of therelease process.
Package: docker-compose-cleanup
Docker Compose cleanupHelps you cleanup Docker images of multiple Docker Compose projects.Free software: ISC licenseDocumentation:https://docker-compose-cleanup.readthedocs.io.UsageInstall with$pipinstalldocker-compose-cleanupOnce installed, just run$docker-compose-cleanup$# Or, alternatively$doco-cleanupThe script will print out commands to remove Docker images related to Docker Compose projects, grouped by projects,
e.g.:Images without tags:
docker image rm sha256:c8f20d0f9a sha256:462683af4d
Project images:
myproject
docker image rm myproject_django:latest myproject_node:latest myproject_celery:latest
pycharm
docker image rm pycharm_helpers:PY-181.4203.547
thtools
docker image rm thtools_app:latestYou can then simply copy & paste to get rid of the specific projects.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.1.0 (2018-04-19)Add colored output, to make project names more visible.Add--versioncommandline option.1.0.0 (2018-04-12)First release on PyPI.
Package: docker-compose-expand
Docker Compose ExpandExpand your docker-compose.yml file with this tool.Install$pip3install--userdocker-compose-expandUsageYour services indocker-compose.ymlfile.version:"3"services:api:image:ef9n/supervisord:0.1.0restart:on-failureports:-"9001:9001"products:image:ef9n/supervisord:0.1.0restart:on-failureports:-"9002:9001"analysis:image:ef9n/supervisord:0.1.0restart:on-failureports:-"9003:9001"monitoring:image:ef9n/supervisord:0.1.0restart:on-failureports:-"9004:9001"Instead of using thedocker-composetool, define the same services in thedocker-compose-expand.ymlfile and use thedocker-compose-expandtool that generates thedocker-compose.ymlfile for your expandable services.You can define variables inloopfield orvarsfield.In theloopfield, you can refer to a variable which is in thevarsfield.Loop Fieldversion:"3"services:api:image:ef9n/supervisord:0.1.0restart:on-failureports:-"9001:9001"expand:vars:services:-name:"{{name}}"service:image:ef9n/supervisord:0.1.0restart:on-failurevolumes:-"/tmp/{{name}}/:/opt/{{name}}/"ports:-"{{port}}:9001"loop:-name:productsport:9002-name:analysisport:9003-name:monitoringport:9004Vars Field# Vars Fieldversion:"3"services:api:image:ef9n/supervisord:0.1.0restart:on-failureports:-"9001:9001"expand:vars:supervisors:-name:productsport:9002-name:analysisport:9003-name:monitoringport:9004services:-name:"{{name}}"service:image:ef9n/supervisord:0.1.0restart:on-failurevolumes:-"/tmp/{{name}}/:/opt/{{name}}/"ports:-"{{port}}:9001"loop:"{{supervisors}}"ExamplesLook up theexamplesdirectory.CreditsDocker ComposeAnsible Yaml Standard
Package: dockercomposeHelp
dockercomposeHelpdockercomposeHelp is a python package for building complex docker-compose files quickly and without errors. It only supports Compose file version 3.Usage:It follows a very simple usage procedure:fromdockercomposeHelp.composeimportComposemy_compose=Compose()#create a compose instanceservice_db=Service('db')#create a service instanceservice_db.image('mysql')service_db.command('--default-authentication-plugin=mysql_native_password')service_db.restart('always')service_db.environment({'MYSQL_ROOT_PASSWORD':'example'})service_db.ports(['8080:8080'])my_compose.add_service(service_db)#add service to composemy_compose.make_compose()#output composeThe above code snippet will produce the following yaml file:services:db:command:--default-authentication-plugin=mysql_native_passwordenvironment:MYSQL_ROOT_PASSWORD:exampleimage:mysqlports:-8080:8080restart:alwaysversion:'3.7'To be added:service.deploy.rollback_configservice.deploy.update_configservice.pidservice.secretsservice.security_optservice.stop_grace_periodservice.stop_signalservice.sysctlsservice.tmpfsservice.ulimitsservice.userns_modeUnsupported:service.links -- LEGACY FEATURE
Package: docker-compose-just-quieter
Docker Compose, just quieterDocker Compose CLI utility wrapper which makesdocker-composequieter.This Docker Compose CLI utility wrapper allows users to hideStarting <...>/Stopping <...>and similar messages fromdocker-compose's output.Docker Compose is overly verbose when starting containers for a service:$docker-compose--project-nametestrun--rmtest_servicebash
Creatingnetwork"test-bash_default"withthedefaultdriver
Creatingtest-bash_postgresql-server_1...doneCreatingtest-bash_solr-zookeeper_1...doneCreatingtest-bash_extract-article-from-page_1...doneCreatingtest-bash_rabbitmq-server_1...doneCreatingtest-bash_solr-shard-01_1...doneCreatingtest-bash_import-solr-data-for-testing_1...done$docker-compose--project-nametestdown--volumes
Stoppingtest-bash_import-solr-data-for-testing_1...doneStoppingtest-bash_solr-shard-01_1...doneStoppingtest-bash_postgresql-server_1...doneStoppingtest-bash_solr-zookeeper_1...doneStoppingtest-bash_extract-article-from-page_1...doneStoppingtest-bash_rabbitmq-server_1...doneRemovingtest-bash_import-solr-data-for-testing_1...doneRemovingtest-bash_solr-shard-01_1...doneRemovingtest-bash_postgresql-server_1...doneRemovingtest-bash_solr-zookeeper_1...doneRemovingtest-bash_extract-article-from-page_1...doneRemovingtest-bash_rabbitmq-server_1...doneRemovingnetworktest-bash_defaultSetting--log-leveltoWARNINGdoesn't seem to help, and multiple issues and PRs to address the issue have been unsuccessful so far:https://github.com/docker/compose/pull/6217https://github.com/docker/compose/pull/6194https://github.com/docker/compose/issues/6026This wrapper monkey-patchesParallelStreamWriterfor it to take into account--log-levelsetting and make the output quieter, and then runs Compose's CLI normally.Why it's cool to useThis isnot a fork, so the utility should work with newer versions of Compose as long asParallelStreamWriterinterface remains the same as it was at the time of writing this hack. So far, it's been tested withdocker-composeversion 1.25.0 and Python 3.7.Itdoesn't have any third party dependencies(except for Docker Compose itself of course).Itdoesn't have to be installed, you can just add this repository as a submodule to your project, or copy-paste thedocker-compose-just-quieterscript somewhere. With that said, you canpip3 install docker-compose-just-quietertoo if you feel like it.UsageInstall Docker Compose using yourfavourite method, e.g.:$pip3installdocker-composePlacedocker-compose-just-quieterscript somewhere in yourPATH, or add directory withdocker-compose-just-quieterto yourPATH.Usedocker-compose-just-quieterscript instead of vendor'sdocker-composescript, e.g.:docker-compose-just-quieterpsReduce verbosity level with--log-levelargument just like you would fordocker-composeitself, e.g.:$docker-compose-just-quieter--log-levelWARNINGruntest_servicebash
Package: docker-compose-postgres
usage: docker-compose-postgres [-h] [-c COMMAND] [-T] [--docker-compose-command DOCKER_COMPOSE_COMMAND] [-p] [-f FILE] [--env-user ENV_USER] [--env-db ENV_DB] [--service SERVICE] [-U USERNAME] [-d DBNAME]

optional arguments:
  -h, --help            show this help message and exit
  -c COMMAND, --command COMMAND
                        run only single command (SQL or internal) and exit
  -T                    disable pseudo-tty allocation. By default `docker-compose exec allocates a TTY.
  --docker-compose-command DOCKER_COMPOSE_COMMAND
                        path to docker-compose executable. Default `docker-compose`
  -p, --print           do not call subprocess. Print command only.
  -f FILE, --file FILE  specify an alternate compose file (default: docker-compose.yml)
  --env-user ENV_USER   environment variable which defines username. Default `POSTGRES_USER`
  --env-db ENV_DB       environment variable which defines dbname. Default `POSTGRES_DB`
  --service SERVICE     specify name of service. Default behaviour is to find service with image name starts with `postgres:`
  -U USERNAME, --username USERNAME
                        database user name
  -d DBNAME, --dbname DBNAME
                        database name
Package: docker-composer
Docker ComposerA library to interact withdocker-composeV2 from a python Program.
All commands and parameters are exposed as python classes and attributes
to allow for full auto-completion of its parameters with IDEs
that support it.Installpipinstalldocker-composerUsageThe main class isdocker_composer.DockerCompose. Its parameters are
all options fromdocker-compose.Eachdocker-composecommand has a corresponding function, e.g.DockerCompose.runorDockerCompose.scale. Their arguments again mirror
the options of the corresponding command.The resulting object has acallfunction.
It takes arbitrary strings as input, as well as all keyword arguments fromsubprocess.run, and returns asubprocess.CompletedProcessfromdocker_composerimportDockerComposebase=DockerCompose(file="docker-compose.yml",verbose=True)base.run(detach=True,workdir="/tmp").call("app")base.run(workdir="/tmp").call("app","/bin/bash","-l")# /tmp $ ls /.dockerenv# /.dockerenv# /tmp $ exitprocess=base.ps(all=True).call(capture_output=True)print(process.stdout.encode("UTF-8"))#          Name                      Command           State    Ports# -------------------------------------------------------------------# myapp_app_70fd8b786b76   myapp --start-server        Exit 0# myapp_app_6ac3db4e1b55   myapp --client              Exit 0DevelopCoding StandardsTypePackageCommentLinterblackAlso for auto-formatted modulesLoggingloguruPackagingpoetryTestspytestTypingmypyType all methodsImportsisort
Package: docker-compose-reloaded
docker-compose-reloadedA python CLI tool to update stacks on event triggers like MQTT[!WARNING]This project is just out of the oven and will introduce some breaking changes soon.InstallationThe script can be installed via pip:pipinstalldocker-compose-reloadedConfiguration[!NOTE]
The default config path is/etc/docker-compose-reloaded/config.json.
But you can change it with the-foption.You can give it a quick start and use theexample config,
which will restart some docker stacks if certain images are updated. The event
trigger in this exampel is an MQTT message to one of the subscribed topics.List of configuration optionsOptionLong OptionDescription-f--fileConfig file path-r--reloadTims [s] to check for config changesFire it up!With the config present, you can just rundcrrunor (if you have a custom config location)dcrrun-f/path/to/your/config.json