Saravanan666/pypi-org huggingface dataset:
Package: docker-droplet
docker-dropletCreate a single digital ocean droplet and provision it to run the docker engine over a simple cli.StatusSourceShieldsProjectPublishersDownloadsRaisedMotivationCreating a single droplet provisioned to use docker should be quick. Ansible and Terraform are the appropriate tools but may take long to configure for a single droplet. This package provides a simple cli to streamline the use of these tools.InstallingInstall the package from pypi:pipinstalldocker-dropletAlternatively, you can clone the repo:gitclonehttps://github.com/JoelLefkowitz/docker-droplet.gitRunning the packageUsage:docker-dropletup[options]docker-dropletdown[options]To create a terraform configuration and run an ansible playbook to install docker:docker-dropletup--droplet-namesteve--ssh-key/home/.ssh/steve.pub--token12345--config-path/Workspace/config.tfWhere the terraform configuration path defaults to "./config.tf"The droplet's name, ssh key path and digitalocean token will be synchronized with environment variables:exportTF_VAR_DOCKER_DROPLET_DROPLET_NAME=steveexportTF_VAR_DOCKER_DROPLET_SSH_KEY=/home/.ssh/steve.pubexportTF_VAR_DOCKER_DROPLET_TOKEN=12345docker-dropletupA domain and digital ocean project title can also be specifieddocker-dropletup--domainexample.com--projectexampleTo remove the structure simply take it down:docker-dropletdown--token12345--config-path/Workspace/config.tfRunning testsTests are not included in the package build. Clone the repo to include all the source files.python-msetup.pytestWhat is being testedUnittests are used to test for appropriate behavior from:The template's loaderThe interface's argument validationThe interface's path_validationDocsDocs are not included in the package build. Clone the repo to include all the source files.Full documentation can be generated locally:pythonsetup.pydocsTo view the generated docs visit ./build/sphinx/html/docker_droplet/docs/modules.html:open-a"Google Chrome"./build/sphinx/html/docker_droplet/docs/modules.htmlContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests.VersioningWe useSemVerfor versioning. For the versions available, see the tags on this repository.Bumpversion is used to version and tag changes.
For example:bumpversionpatchReleases are made on every major change.AuthorJoel Lefkowitz-Initial work-JoelLefkowitzSee also the list of contributors who participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsAcknowledgmentsNone
Package: docker-dynamic-inventory
Docker Dynamic InventoryGenerates a dynamic inventory of Docker containers for Ansible.Free software: BSD licenseDocumentation:https://docker-dynamic-inventory.readthedocs.io.FeaturesAble to filter out a single host by name.Optionally includes Docker metadata in Ansible’s hostvars.Optionally pretty-prints output for readability.Operates on the local Docker instance by default but can work with a remote host as well.Can be used as a Python module (if you really want to)UsageUsage: docker-dynamic-inventory [OPTIONS]

Dynamic inventories of Docker containers, served up fresh just for
Ansible.

Options:
  --host TEXT                 Only match containers with this name.
  --metadata / --no-metadata  Include container metadata.
  --pretty / --ugly           Pretty print JSON for output.
  --docker_tls TEXT           Use TLS for Docker connections.
  --docker_host TEXT          Docker host to connect to.
  --help                      Show this message and exit.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-02-23)First release on PyPI.
Package: docker-emperor
Docker Emperor is a CLI Tool for orchestrate multi-container Docker applications with a Docker Compose YAML extended file.
Then, with a few commands, you create and start all the services from your configuration like compose but also deploy and manage those applications in their context (via Docker Machine as possible).
To learn more about all the features of Docker Emperor, see [the list of features](/docker/docker-emperor/overview/#features).Docker Emperor is designed toDescribeall your projectand those functionnal environments inone smallest YML file.Manage and deploy inone or few command(de build, de launch, de deploy).Work asNever bash to remotelocal CLI (with the Docker Machine little help).Writecustom commandsvery easly in the description file.Has fullcombinatory / heritage capabilities(environment, commands, services, volumes, etc..).Compatible with any docker-compose existing files.Lightweight and dependency-less.First, readdocs/install.mdfor instructions on installing Docker-emperor.
Package: docker-events
objectivehave a CLI to start a process which runs abitrary code on docker eventsbe able to provide a way to change behavior of and provide data to event subscribersload subscribers by module or fileevents may be extendedinstall# pip install docker-eventsusage# docker-events --helpUsage:docker-events[OPTIONS]Options:-s,--sockTEXTthedockersocket-c,--configFILENAMEaconfigyaml-m,--moduleTEXTapythonmoduletoload-f,--filePATHapythonfiletoload-l,--logPATHloggingconfig--debugenabledebugloglevel--helpShowthismessageandexit.# create a config for skydns# cat > skydns-config.yaml << EOF---skydns:domain:fooskydns.containers:redis:domain:myredis.{domain}EOF# run skydns subscriber on start events
# docker-events -c skydns-config.yaml -m docker_events.tools.skydnsAPIThere are some predefined events:start,stop,create,die,destroy,pullYou may write your own events like this:@eventdefpull(client,event_data):returnevent_data.get('status')=='pull'Events may be extended by other events:@docker_events.pull.extenddefpull_something(client,event_data):returnevent_data['id'].startswith("foobar")For example if you want to use skydns, you may want to put the following code into a file or module and load it via-mor-foption:"""
setup skydns records for containers
"""importdocker_eventsimportetcdimportsimplejsonasjsonetcd_client=etcd.Client()@docker_events.start.subscribedefset_skydns_record(client,docker_event,config):# get ip of containercontainer=client.inspect_container(docker_event['id'])container_name=container['Name'].strip("/")container_ip=container['NetworkSettings']['IPAddress']skydns_config=config.get('skydns',{})skydns_containers=config.get('skydns.containers',{'domain':'docker.local'})# find domain name for this containerifskydns_configandcontainer_nameinskydns_containers:# use templatedomain=skydns_containers[container_name].get('domain').format(**skydns_config)else:# join container_name with domaindomain='.'.join((container_name,skydns_config.get('domain')))domain_path='/'.join(reversed(domain.split('.')))etcd_client.write('/skydns/local/skydns/{}'.format(domain_path),json.dumps({'host':container_ip}))
Package: docker-event-scripts
Run scripts in response to Docker events.Version: 0.1.3Author: Cole BrumleyOverviewUse thedescommand to monitorDockerfor events. When an event occurs,desexecutes a script with the event metadata exported to the environment.Installation / UsageTo install use pip:pip install docker-event-scriptsThe script directory is defined via the-dflag, and defaults to/etc/docker/events.d. Scripts should be placed in sub-directories in the formatSCRIPT_DIR/EVENT_TYPE/EVENTand should be marked executable.The environment variables set during each script run are a flattened version of the raw API event dictionary. If you’re writing a script for an event you’re unfamiliar with, you may want to run it once withprintenvto see what’s available.See the Dockerdocsfor the full list of possible events.To generate a full directory structure with dummy scripts for every event, rundes-c.ContributingPlease submit issues or pull requests via theGitHub repo.ExampleUsing the default script directory, when this example container was started usingdocker run-it--rmalpine sh, the script at/etc/docker/events.d/container/startwas executed with the following environment:ACTION=start
ACTOR_ATTRIBUTES_IMAGE=alpine
TIME=1471131434
ACTOR_ID=467730e17a0ac265eae034d21cf633755aa57d03483ae479b623bc5569d6c274
STATUS=start
ACTOR_ATTRIBUTES_NAME=backstabbing_lichterman
ID=467730e17a0ac265eae034d21cf633755aa57d03483ae479b623bc5569d6c274
FROM=alpine
TYPE=container
TIMENANO=1471131434853322607
Package: docker-evolve
docker-evolveKeep evolving a container's state to effectively use it as a constant subsystem.UsageStart with a new container:$ docker-evolve –-name ubuntu --base-image ubuntu -v $PWD:/hostConnect to the container as usual:$ docker exec -it ubuntu bashAfter making changes that you want to persist but you need to update the container
configuration, for example to expose a port, pass the parameters todocker-evolve:$ docker-evolve --name ubuntu -v $PWD:/host -p 8090:8090This will commit the container's current state and re-create it using the new image
and the specified arguments. Note how you can now skip the--base-imageargument
because the container already exists.
Package: docker-executor
CreditsUses the wonderful pipework script of jpetazzo:https://github.com/jpetazzo/pipeworkInstallation::cd docker-executor
virtualenv venv
. venv/bin/activate
pip install –editable .Requiresdocker-executor reads the configuration from a K/V store.Cluster object:dnsname: name to register the cluster in the service discovery’s DNSNode object:name: hostname of the docker containerdocker_image: URL of the docker image to usedocker_opts: specific docker run options to usecpu: number of cores that can be used by this containermem: memory in MB that can be used by this containerdisks: Disk object list (see below)networks: Network object list (see below)port: main service port used for service discovery, e.g. 22tags: list of tags for service discovery separated by comma, eg. ‘v1,testing,hdp’check_ports: list of ports to check that the container is alive, eg. ‘22,5000,8080’id: it will be set to the docker id of the running containerhost: it will be set docker engine where the container is runningstatus: it will be set to the current status of the nodeNetwork object (registry.Network object):type: ‘static’, ‘dynamic’networkname: name of the network to use form the networks serviceaddress: for dynamic allocation use ‘_’, ‘dynamic’ or ‘’The name of the network device (eg. eth0) is taken automatically from the name of thedirectory in consul: eg. node/networks/eth0/address -> eth0Volume object (registry.Disk object):origindestinationmode (OPTIONAL): default ‘rw’DeploymentUsing clush and pip:::python setup.py sdist upload -r pypi
clush -bw @bigdata pip install –upgrade –no-cache-dir docker-executor
Package: docker-export
docker-exportExport Docker Images (v2 manifests only) to a single.tar, withoutdocker;
Using Python and the registry's API.UsagesInstallationdocker-exportis a Python3 software. You are advised to use it in a
virtual environment to avoid installing software dependencies on your
system.python3-mvenv./env# creates a virtual python environment in ./env folder./env/bin/pipinstall-Upip# upgrade pip (package manager). recommended./env/bin/pipinstall-Udocker-export[all]# install/upgrade docker-export inside virtualenv# direct access to in-virtualenv docker-export binary, without shell-attachment./env/bin/docker-export--help# alias or link it for conveniencesudoln-s$(pwd)/env/bin/docker-export/usr/local/bin/# alternatively, attach virtualenv to shellsourceenv/bin/activate
docker-export--help
deactivate# unloads virtualenv from shellCommand linedocker-export--platformlinux/arm/v7ghcr.io/kiwix/kiwix-tools:3.0.0kiwix-tools.tarPython moduleimportpathlibfromdocker_exportimportPlatform,Image,exportexport(image=Image.parse("kiwix/kiwix-tools:3.3.0"),platform=Platform.auto(),to=pathlib.Path("kiwix-tools.tar"),)Using exported imageExported images (tarball) are loaded into dockerd via:dockerload-iIMAGE.tar# verify it's been properly addeddockerimages
Package: docker-fabric
Docker-FabricBuild Docker images, and run Docker containers in Fabric.Project:https://github.com/merll/docker-fabricDocs:https://docker-fabric.readthedocs.io/en/latest/OverviewWith a few preparations, Docker images can easily be generated and
tested on development machines, and transferred on to a production
environment. This package supports managing container configurations
along with their dependencies within Fabric-based deployments.
DockerFiles can also be easily implemented in Fabric tasks.Local Docker clients can be controlled directly throughdocker-py.
Remote Docker API services make use of Fabric’s SSH connection.API accessThis project is based onDocker-Map, and adapts its
container configuration methods.As with Docker-Map, container configurations can be generated as
objects, updated from Python dictionaries, or imported from YAML files
in order to control remote clients via the API. Docker-Fabric includes
the following enhancements:Docker clientDockerFabricClientadds Fabric-like logging in the context of
container instances on top of Fabric hosts, and enables automatic
creation of tunnel connections for access to a remote Docker host using
Fabric’s SSH connection. By using the toolsocat, the Docker client
can access a remote service without re-configuration.Client configurationDockerClientConfigurationadds the capability of running containers
to Fabric hosts with specific Docker settings for each, e.g. the version
number.Running container configurationsContainerFabricis a simple wrapper that combines Docker-Map’sDockerFabricClient,DockerClientConfigurationobjects, and
container maps.Command-line based accessThe following features are provided by running the appropriate commands
on a remote Docker command line:Copy resources from a container to a Fabric host.Copy resources from a container and download them in a compressed
tarball. The Docker Remote API currently does not support creating
compressed tarballs.Copy resources from a container and store them in a new blank image.Generate a compressed image tarball. The Docker Remote API currently
does not support creating compressed tarballs, but is capable of
importing them.TasksAll essential container actions (create,start,stop,remove) and some advanced (e.g.update) can be triggered from
the command line as Fabric tasks and executed on the remote service,
e.g. via SSH.Additionally the following tasks are included in this package, that can
be run by Fabric directly:check_version: Returns version information of the remote Docker
service and provides useful insight if permissions are set up
properly.cleanup_containers: Removes all containers that have stopped.cleanup_images: Removes all untagged images, that do not have a
dependent container or other dependent images.remove_all_containers: Stops and removes all containers on the
remote Docker service.ContributionsThanks tolfasnachtfor publishing an
implementation for a local tunnel to a Fabric client in thepull
request 939 of Fabric.Further contributions are maintained inCONTRIBUTIONS.mdof the project.
Package: dockerfactory
Control the context of your docker builds.Dockerfactory makesdocker buildeasier by using a config file
(Dockerfactory.yml) instead of command line arguments to build.Dockerfactory.ymlalso lets you specify the build context so you can pick and
choose the exact directories or files that get added to your Docker build
context.Dockerfactory.yml# Automatically tag built imagestag:six8/dockerfactory# Can override the Dockerfiledockerfile:./Dockerfile.prod# Most `docker build` parameters work (use '_' instead of '-')force_rm:Truememory:100mcontext:# Relative directories are relative to Dockerfactory.yml# Must specify current directory if you want it. Dockerfactory# does not assume you want the current directory..:/# Dockerfactory allows paths outside of current directory../foobar:/foobarSeedocker buildfor full set of parameters.UsageYou can either install as a Python package withpip install dockerfactoryor
run as a docker image.dockerrun-it--rm\-v/var/run/docker.sock:/var/run/docker.sock\-v${PWD}:/project\six8/dockerfactory:0.1\/project/Dockerfactory.ymlDockerfactorybuilding:Withcommand:dockerbuild--force-rm--memory100m--no-cache--tagsix8/dockerfactory:0.1-WithDockerfile:/project/DockerfileWithcontext:-/project:/SendingbuildcontexttoDockerdaemon97.28kB....
Package: dockerfile
dockerfileThe goal of this repository is to provide a wrapper arounddocker/docker's parser for dockerfiles.python libraryInstallationThis project usessetuptools-golangwhen built from source.  To build from source you'll need a go compiler.If you're using linux and sufficiently new pip (>=8.1) you should be able to
just download prebuilt manylinux1 wheels.pip install dockerfileUsageThere's three api functions provided by this library:dockerfile.all_cmds()List all of the known dockerfile cmds.>>>dockerfile.all_cmds()('add','arg','cmd','copy','entrypoint','env','expose','from','healthcheck','label','maintainer','onbuild','run','shell','stopsignal','user','volume','workdir')dockerfile.parse_file(filename)Parse a Dockerfile by filename.
Returns atupleofdockerfile.Commandobjects representing each layer of
the Dockerfile.
Possible exceptions:dockerfile.GoIOError: The file could not be opened.dockerfile.GoParseError: The Dockerfile was not parseable.>>>pprint.pprint(dockerfile.parse_file('testfiles/Dockerfile.ok'))(Command(cmd='from',sub_cmd=None,json=False,original='FROM ubuntu:xenial',start_line=1,flags=(),value=('ubuntu:xenial',)),Command(cmd='cmd',sub_cmd=None,json=True,original='CMD ["echo", "hi"]',start_line=2,flags=(),value=('echo','hi')))dockerfile.parse_string(s)Parse a dockerfile using a string.
Returns atupleofdockerfile.Commandobjects representing each layer of
the Dockerfile.
Possible exceptions:dockerfile.GoParseError: The Dockerfile was not parseable.>>>dockerfile.parse_string('FROM ubuntu:xenial')(Command(cmd='from',sub_cmd=None,json=False,original='FROM ubuntu:xenial',start_line=1,flags=(),value=('ubuntu:xenial',)),)go librarySlightly more convenient than the api provided by docker/docker?  Might not be
terribly useful -- the main point of this repository was a python wrapper.Installationgo get github.com/asottile/dockerfileUsagegodoc
Package: dockerfile-kernel
dockerfile-kernelThis implements a JupyterLab kernel to interpret Dockerfiles.FeaturesLine-based execution of Dockerfiles in JupyterLabConveniently launch shell sessions running in a container created from the current image by clicking on a button.Command auto-completionSyntax HighlightingHelp text integration with the?operationExport and Import from DockerfilesCustom magics for e.g.Tag the current Docker image with%tag myimage:latestEasily follow best practices of installation with%install apt <packagename>(will expand to aRUNcommand doing all the required setup and cleanup). Also implemented forpipandnpm.Manipulate build arguments with%argGet an overview of existing build stages with%stagesManipulate the build context with%contextPrerequisitesCurrently, only Linux is supportedDockerneeds to be installedThe user needs to be in thedockergroup (see e.g.here)JupyterLab>= 4.0.0 needs to be installedInstallationWith pip:python-mpipinstalldockerfile-kernel
python-mdockerfile_kernel.installWith conda:condainstall-cconda-forgedockerfile-kernelExecutionjupyter lab
Package: dockerfile-parse
dockerfile-parsePython library for parsing Dockerfile files.InstallationFrom PyPIpipinstalldockerfile-parseFrom gitClone this git repo and install using the python installergitclonehttps://github.com/containerbuildsystem/dockerfile-parse.gitcddockerfile-parse
sudopipinstall.Usagefrompprintimportpprintfromdockerfile_parseimportDockerfileParserdfp=DockerfileParser()dfp.content="""\From  baseLABEL foo="bar baz"USER  me"""# Print the parsed structure:pprint(dfp.structure)pprint(dfp.json)pprint(dfp.labels)# Set a new base:dfp.baseimage='centos:7'# Print the new Dockerfile with an updated FROM line:print(dfp.content)
Package: dockerfile-recover
dockerfile-recoverdockerfile-recover is a tool to reconstruct Dockerfile by reverse engineering a docker imageInstallationWith pippip install dockerfile-recoverIn a containerdocker pull purificant/dockerfile-recoverUsageWhen installing with pipdockerfile-recover recover IMAGE_NAMEOptionally--pullthe image, for example:dockerfile-recover recover --pull python
dockerfile-recover recover --pull django
dockerfile-recover recover --pull redis
dockerfile-recover recover --pull nodeor run as python modulepython -m dockerfile_recover recover --pull nginxWhen running in a containerdocker run -it -v /var/run/docker.sock:/var/run/docker.sock purificant/dockerfile-recover python -m dockerfile_recover recover IMAGE_NAME
Package: dockerfile-sec
Dockerfile-secDockerfile-sec is a simple but powerful rules-based checker for Dockerfiles.Install>pipinstalldockerfile-secQuick startAnalyze a Dockerfile>dockerfile-secexamples/Dockerfile-example
+----------+-------------------------------------------+----------+|RuleId|Description|Severity|+----------+-------------------------------------------+----------+|core-001|Missingcontenttrust|Low||core-002|MissingUSERsentenceindockerfile|Medium||core-003|Posibletextplainpasswordindockerfile|High||core-005|Recursivecopyfound|Medium||core-006|UseofCOPYinsteadofADD|Low||core-007|UseimagetaginsteadofSHA256hash|Medium||cred-001|Genericcredential|Medium||java-001|Missingcontenttrust|Low|+----------+-------------------------------------------+----------+UsageWith remote rules>dockerfile-sec-rhttp://127.0.0.1:9999/rules/credentials.yamlDockerfileWith built-in rulesAll rulesAll rules are enabled by default:>dockerfile-secDockerfileCore rules onlyhttps://github.com/cr0hn/dockerfile-security/blob/master/dockerfile_sec/rules/core.yaml>dockerfile-sec-RcoreDockerfileJava rules onlyhttps://github.com/cr0hn/dockerfile-security/blob/master/dockerfile_sec/rules/java.yaml>dockerfile-sec-RjavaDockerfileCredentials rules onlyhttps://github.com/cr0hn/dockerfile-security/blob/master/dockerfile_sec/rules/credentials.yaml>dockerfile-sec-RcredentialsDockerfileDisabling built-in rules>dockerfile-sec-RnoneDockerfileWith user defined rules>dockerfile-sec-rmy-rules.yamlDockerfileWith many user-defined rules files>dockerfile-sec-rrules/java.yaml-rrules/credentials.yamlDockerfileExport results as json>dockerfile-sec-oresults.jsonDockerfileQuiet modeNot writing anything in the console:>dockerfile-sec-q-oresults.jsonDockerfileFiltering false positivesBy ignore fileDockerfile-sec allows to ignore rules by using a file that contains the rules you want to ignore.>dockerfile-sec-Fignore-rules.textDockerfileIgnore file format contains theIDsof rules you want to ignore.one ID per line. Example:>lsignore-rules.text
core-001
core-007By using the cliYou also can use cli to ignore specificIDs:>dockerfile-sec-icore-001,core007DockerfileUsing as a pipelineYou also can use dockerfile-sec as UNIX pipeline.Loading Dockerfile from stdin:>catDockerfile|dockerfile-sec-icore-001,core007Exposing results via pipe:>catDockerfile|dockerfile-sec-icore-001,core007|jqOutput formatsJSON Output format[{"description":"Missing content trust","id":"core-001","reference":"https://snyk.io/blog/10-docker-image-security-best-practices/","severity":"Low"},{"description":"Missing USER sentence in dockerfile","id":"core-002","reference":"https://snyk.io/blog/10-docker-image-security-best-practices/","severity":"Medium"}]Referenceshttps://snyk.io/blog/10-docker-image-security-best-practices/https://medium.com/microscaling-systems/dockerfile-security-tuneup-166f1cdafea1https://medium.com/@tariq.m.islam/container-deployments-a-lesson-in-deterministic-ops-a4a467b14a03