Saravanan666/pypi-org huggingface dataset:
Package: docker_remove
.. image:: https://badge.fury.io/py/docker_remove.svg:target: https://badge.fury.io/py/docker_remove=============Docker Remove=============Utility to easily remove Docker Container(s)/Image(s) through string matching+ `Installation`_+ `Usage`_+ `Examples`_------------Installation------------``pip install docker_remove``-----Usage-----Help----::╰─$ docker_remove --helpusage: docker_remove [-h] [--container CONTAINER] [--image IMAGE][--name NAME] [-a] [-f]Use this simple command to remove Docker container(s) or images(s) throughstring matching.optional arguments:-h, --help            show this help message and exit--container CONTAINER, -c CONTAINERFlag to remove Docker container(s) only--image IMAGE, -i IMAGEFlag to remove Docker image(s) only--name NAME, -n NAME  Flag to remove both Docker container(s) and image(s)-a                    Flag to remove hidden container(s)/image(s)-f                    Flag to forcefully remove container(s)/image(s)Remove Containers-----------------::docker_remove -c stringdocker_remove --container stringRemove Images-------------::docker_remove -i stringdocker_remove --image stringRemove both Containers and Images---------------------------------::docker_remove -n stringdocker_remove --name stringRemove hidden Container/Image-----------------------------::docker_remove -a --container stringdocker_remove -a -c stringdocker_remove -a --image stringdocker_remove -a -i stringdocker_remove -a --name stringdocker_remove -a -n stringRemove Container/Image Forcefully---------------------------------::docker_remove -f --container stringdocker_remove -f -c stringdocker_remove -f --image stringdocker_remove -f -i stringdocker_remove -f --name stringdocker_remove -f -n string--------Examples--------.. image:: img/screenshot-1.png.. image:: img/screenshot-2.png.. image:: img/screenshot-3.png
Package: docker-runcheck
Docker runcheckCheck wheter required binaries are available in the used docker image without having to first run an expensive and long docker build.·Report Bug·Request FeatureTable of ContentsAbout The ProjectGetting StartedUsageRoadmapContributingLicenseContactAcknowledgmentsAbout The ProjectRun docker-runcheck to validate your Dockerfile before attempting time-intensive docker builds.docker-runcheck works as follows:contructs one or more containers based on the mentioned imagedocker image is downloaded if not present
but it is not built.export image as tar file and compile a list of the available binaries in the imagecompile a list of any binaries mentioned in a RUN command that are  missing from the image or are used before being installed by a package manager.(back to top)Getting StartedWe need the docker sdk and the dockerfile librarypipinstall-rrequirements.txtInstallationpip install docker_runcheckUsageYou can then run docker-runcheck with:python-mdocker_runcheckRoadmap[] Detect binary is installed by super package (e.g. build-essential)ContributingContributions aregreatly appreciated.If you have a suggestion to make this project better, please fork the repo and create a pull request.
Don't forget to give the project a star! Thanks!Fork the ProjectCreate your Feature Branch (git checkout -b feature/SuperAmazingFeature)Commit your Changes (git commit -m 'Add some Super Amazing Feature')Push to the Branch (git push origin feature/SuperAmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License.ContactPaulo Aragao -paulo.aragao.dev@gmail.com(back to top)
Package: docker-run-cmd
docker-run-cmdpipinstallrun-docker-cmdRun a self contained docker file representing an entry point. Useful for dockerizing
utility functions.Example dockerfile command:# Use the official Python 3.10 Alpine-based image
FROM python:3.10-alpine

# Install yt-dlp dependencies and yt-dlp itself
# Adding necessary packages including ffmpeg
RUN apk add --no-cache \
    ffmpeg \
    dos2unix \
    && pip install --no-cache-dir yt-dlp ytdlp-brighteon

# Set the working directory in the container
WORKDIR /host_dir

# Build the entrypoint script in the container.
RUN echo '#!/bin/sh' > /entrypoint.sh && \
    echo 'yt-dlp "$@"' >> /entrypoint.sh

# Make the entrypoint script executable
RUN chmod +x /entrypoint.sh

# Set the entrypoint to use /bin/sh
ENTRYPOINT ["sh", "/entrypoint.sh"]Now save this as mydockerfileNow run it:run-docker-cmdmydockerfileDocker commandsSelf contained dockerfile's representing a command to be run. No external dependencies. The current working directory will be mapped into the container as /host_dirDevelopeTo develop software, run. ./activate.shWindowsThis environment requires you to usegit-bash.LintingRun./lint.shto find linting errors usingpylint,flake8andmypy.
Package: docker-run-docker-ros
docker-run-docker-rosdocker-runplugin for Docker images built bydocker-ros.Installationpipinstalldocker-run[docker-ros]Usageusage: docker-run [--help] [--image IMAGE] [--mwd] [--mws] [--name NAME]
                  [--no-gpu] [--no-it] [--no-loc] [--no-name] [--no-rm]
                  [--no-tz] [--no-user] [--no-x11] [--verbose] [--version]

Executes `docker run` with the following features enabled by default, each of
which can be disabled individually: container removal after exit, interactive
tty, current directory name as container name, GPU support, X11 GUI
forwarding. Passes any additional arguments to `docker run`. Executes `docker
exec` instead if a container with the specified name (`--name`) is already
running.

optional arguments:
  --help         show this help message and exit
  --image IMAGE  image name (may also be specified without --image as last
                 argument before command)
  --mwd          mount current directory at same path
  --mws          [docker-ros] mount current directory into ROS workspace at
                 `/docker-ros/ws/src/target`
  --name NAME    container name; generates `docker exec` command if already
                 running
  --no-gpu       disable automatic GPU support
  --no-it        disable automatic interactive tty
  --no-loc       disable automatic locale
  --no-name      disable automatic container name (current directory)
  --no-rm        disable automatic container removal
  --no-tz        disable automatic timezone
  --no-user      [docker-ros] disable passing local UID/GID into container
  --no-x11       disable automatic X11 GUI forwarding
  --verbose      print generated command
  --version      show program's version number and exit
Package: docker-sand
Sand 🏝Sand is a Dockerfile generator.It allows you to write cleaner, shorter and more configurable Dockerfiles.Developers ❤️ SandSand is built by developers, for developers. It's built to be as simple as possible, while still being super useful.InstallationYou can install Sand using pip.pip3installdocker-sandFeatures✅ Simple, easy to learn syntax based on Python.✅ Configurable Dockerfiles.✅ Share code between Dockerfiles.✅ Perfect for monorepos composed of multiple microservices.✅ Supports multi-stage builds.Planned Features:🔘 Optimize builds by finding common layers between Dockerfiles, and merging them into a base image.🔘 Minimizing the number of layers by combining multiple RUN commands into one.ExampleWrite your Dockerfile in a Python-like syntax.# Sandfilefromsandimport*From("ubuntu",Tag="20.04")Run(["apt-get update","apt-get install ffmpeg python3"])# Install python debugger on debug images.ifconfig.DEBUG:Run("pip3 install pdb")Copy("app","/app")Entrypoint("python3 /app/app.py")⬇️# Auto-generated by Sand, do not edit!FROMubuntu:20.04RUNapt-getupdateRUNapt-getinstallffmpegpython3COPYapp/appENTRYPOINTpython3/app/app.pyShare CodeBecauseSandfiles are just Python files, and are being evaluated in an hierarchical manner by using theSanddirective, you can easily share code between them.Given the following directory structure:my-monorepo/
│
├── tweet-service/
|   ├── src/
|   ├── ...
│   └── Sandfile
│
├── home-timeline/
|   ├── src/
|   ├── ...
│   └── Sandfile
│
└── SandfileYou can write yourSandfiles like this:# ./my-monorepo/Sandfilefromsandimport*defMyService(name):From("ubuntu","20.04")Run("apt-get install python3")Copy(Src="src",Dst="/app")Entrypoint(f"python3 /app/{name}.py")Sand("tweet-service")Sand("home-timeline")# ./my-monorepo/tweet-service/Sandfilefromsandimport*MyService("tweet-service")# Defined in ../Sandfile# ./my-monorepo/home-timeline/Sandfilefromsandimport*MyService("home-timeline")# Defined in ../SandfileThis allows you to share code between your Dockerfiles, and keep themDRY.This is similar to the wayadd_subdirectoryworks inCMakeUsageRunning Sand is as simple as runningsandin your terminal.
This will generate Dockerfiles for all Sandfiles in the current directory.$ sand config
Saving Dockerfile to backend/service1/Dockerfile
Saving Dockerfile to backend/service2/Dockerfile
Built successfully!You can also watch for changes and automatically rebuild your Dockerfiles.$ sand config -w
Watching for changes...ConfigurationYou can pass configuration values to Sand using the-Dor--setflag.$ sand config -DDEBUG=TrueOr use a YAML file.# sand.yamlDEBUG:True$ sand config --values sand.yaml
Package: dockerscan
dockerscandockerscan: A Docker analysis & hacking toolsProject sitehttp://github.com/cr0hn/dockerscanIssueshttps://github.com/cr0hn/dockerscan/issues/AuthorDaniel Garcia (cr0hn) / Roberto Munoz (robskye)Documentationhttp://dockerscan.readthedocs.orgLast Version1.0.0-Alpha-02Python versions3.5 or aboveWhat’s dockerscanA Docker analysis toolsVery quick install>python3.5-mpipinstall-Upip>python3.5-mpipinstalldockerscanShow options:>dockerscan-hAvailable actionsCurrently Docker Scan support these actions:Scan: Scan a network trying to locate Docker RegistriesRegistryDelete: Delete remote image / tagInfo: Show info from remote registryPush: Push an image (like Docker client)Upload: Upload a random fileImageAnalyze: Looking for sensitive information in a Docker image.Looking for passwords in environment vars.Try to find any URL / IP in the environment vars.Try to deduce the user used internally to run the software. This is not trivial. If the entry point is a .sh file. Read the file and try to find call to sudo-like: “sudo”, “gosu”, “sh -u”… And report the user found.Extract: extract a docker imageInfo: Get a image meta informationModify:entrypoint: change the entrypoint in a dockertrojanize: inject a reverser shell into a docker imageuser: change running user in a docker imageWhat’s the difference from Clair or Docker Cloud?The purpose of Dockerscan is different. It’s focussed in the attack phase.Although Dockescan has some functionalities to detect vulnerabilities in Docker images and Docker registries, the objective is the attack.DocumentationDocumentation is still in progress… sorry!For the moment we only have the slides presented at RootedCON Spain, the conference where Docker Scan was presented:https://www.slideshare.net/secret/fxVqD2iXqanOCXOr you can watch it in video format (recommended):https://youtu.be/OwX1e4y4JMkAlso, you can watch a dockerscan usage demo:https://youtu.be/UvtBGIb3E3oContributingAny collaboration is welcome!There are many tasks to do. You can check theIssuesand send us a Pull Request.LicenseThis project is distributed underBSD license
Package: dockerscript
dockerscriptTool for generating Dockerfiles from Python.Free software: MIT licenseDocumentation:https://dockerscript.readthedocs.io.FeaturesSimplified Dockerfile creationTODODocumentationLintingOptimizerSpecialized operatorsComplete set of operators
* ADD
* ENTRYPOINT
* VOLUME
* USER
* ARG
* ONBUILD
* STOPSIGNALCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.0 (2017-04-21)First release on PyPI.
Package: docker-secret-getter
get-docker-secretUtility function to fetch docker secrets/envvars.For config values (flask projects) i like to fetch docker secrets and fall back to environment variables for development. This module provides a function to make this a one-liner: use docker secret -> fall back to envvar -> fall back to default value.The function also provides the possibility to automatically cast the value or specify a custom directory for secrets.Following assumptions are being made (params):autocast_name=True: secrets are lower-case, envvars upper-case. automatic conversion of name can be switched off via autocast_name=Falsecast_to=str: fill in desired datatype. special case bool: 'True'/'true' will be True. 'False'/'false' will be Falsegetenv=True: you want to fall back to envvar. can be switched of via getenv=Falsedefault=Nonesafe=True: returns None if name not found or cast fails. If you want exceptions: safe=Falsesecrets_dir=/var/run/secretsUsagefromget_docker_secretimportget_docker_secretvalue=get_docker_secret('secret_key',default='very_secret')Testingpythonsetup.pytestnot tested under windowsChangelog1.0.2 - 2021-03-19Fixed: Only strip trailing newlines from secrets file1.0.1 - 2019-12-07Fixed: Strip values read from file.1.0.0 - 2018-01-30Initial publish
Package: docker-secrets-dotenv
docker-secrets-dotenvdocker-secrets-dotenv takes all your docker secrets files, and sets them up in the environment.Getting Startedpip install docker-secrets-dotenvTo use docker-secrets-dotenv in your project runload_secretsas the start of your application:fromdocker_secretsimportload_secretsload_secrets()# This will load all secret files found in /run/secrets into the running environmentload_secretswill take the name of each secret file to set as the variable key and read the file contents as the value. It will overwrite existing environment variables.There is an optional argument you can pass to remove the suffix of the secret when loading in the the environment:fromdocker_secretsimportload_secretsload_secrets(remove_suffix="_FILE")# This will load all secret files found in /run/secrets into the running environment# after removing "_FILE" from the end of the secrets file name.# /run/secrets/API_KEY_FILE will exist in the environment as API_KEYThis is mostly because I am lazy and don't want to update my existing secrets that follow the _FILE convention set by other docker images, or write my code in a way that checks for both variations with and without the suffix.
Package: docker-snapshot
ds - docker snapshotdsis a development utility for managing snapshots inside a docker container.Personally I use it to quickly save the state of my development database, try out something that mutates the state - a data migration or user interaction - and return to the initial state. Often repeatedly, because trial and error is essential. You can probably use it on any sort of stored data, probably.Note: This repository is still a work in progress.Installing# Note: executable will be called `ds`pipinstalldocker-snapshotShell completion:# For Bash, add this to ~/.bashrc:eval"$(_DS_COMPLETE=source_bashds)"# For Zsh, add this to ~/.zshrc:eval"$(_DS_COMPLETE=source_zshds)"UsageCreate a snapshotdscreatename-goes-here# or auto-generate a namedscreateRestore a snapshotdsrestorename-goes-here# or restore the latest snapshotdsrestoreList snapshotsdslsDelete snapshotsdsdeletename-goes-hereExample project setupIn this example we usedsto create and restore database snapshots in our development environment. The projectsdocker-compose.ymlfile could look something like this:version: "3.8"
services:
  db:
    container_name: db
    restart: always
    image: postgres:13
    env_file: .env
    ports:
      - 5432:5432
    volumes:
      - db-volume:/var/lib/postgresql/data
  ...Browse to your project rootcdcode/your-awesome-projectCreateds.yamltemplate filedsinitEdit yourds.yaml# The target containercontainer_name:"db"# The directory inside said container that you want to snapshotdirectory:"/var/lib/postgresql/data"# Identifier to separate projects, this allows you:# - To have multiple projects with the same container name# - To have multiple setups (ie. docker-compose / kind) for the same projectnamespace:"your-awesome-project"
Package: docker-startup
docker-startupis a set of Startup/Install scripts for docker-based VMs.All documentation is in the “docs” directory and online athttp://pythonhosted.org/docker-startup/.Toinstalldocker-startup:pip install docker-startuporeasy_install docker-startupTo get morehelp:Join thedpawmailing list, or read the archives, athttp://groups.google.com/group/dpaw.To create aticket:Use our bitbucketissue tracker, athttps://bitbucket.org/dpaw/docker-startup/issues/Tocontributetodocker-startup:hg clone https://bitbucket.org/dpaw/docker-startup/
python setup.py developWe prefer patches submitted via pull requests, athttps://bitbucket.org/dpaw/docker-startup/pull-requests/To runstartup’testsuite:python setup.py test
Package: docker-stats
docker-statsdocker stats wrapper which prints output in jsonUsageInstall from PyPI and runusage: docker-stats [-h] [-a] [container [container ...]]

docker stats, json way

positional arguments:
  container   IDs or NAMEs of desired containers

optional arguments:
  -h, --help  show this help message and exit
  -a, --all   get stats of all available containers
  -n, --normalize   try to normalize statsNormalizationRaw output of docker-stats is smth like this:{"my_container":{"blkio_stats":{"io_merged_recursive":[],"io_queue_recursive":[],"io_service_bytes_recursive":[{"major":253,"minor":5,"op":"Read","value":7020544},{"major":253,"minor":5,"op":"Write","value":0},*SNIP*]}}}As one can mention, there are an array object inside keyio_service_bytes_recursiveand each element of that array is flattened JSON with keyopwithin values. That behaviour may occur in other keys.
docker-stats called with key--normalizetries to jsonify that to:{"my_container":{"blkio_stats":{"io_merged_recursive":[],"io_queue_recursive":[],"io_service_bytes_recursive":{"Read":{"major":253,"minor":5,"value":7020544},"Write":{"major":253,"minor":5,"value":0},*SNIP*}}}}
Package: docker-storage
Docker storageProject information:Automated code metrics:docker-storageis a command line tool and a library to easily manage Docker
data-only containersFree software: MIT licenseDocumentation:http://docker-storage.rtfd.org(TODO)Installationpip install docker-storageCommand line usage$ docker-storage box create test-box /data

$ docker-storage box
Name      Path
--------  ------
test-box  /data

$ docker-storage box exec test-box -- touch EXAMPLE

$ docker-storage box ls test-box
total 8
drwxr-xr-x    2 root     root          4096 Sep 23 07:45 .
drwxr-xr-x   30 root     root          4096 Sep 23 07:45 ..
-rw-r--r--    1 root     root             0 Sep 23 07:45 EXAMPLE

$ docker-storage box rm test-box

$ docker-storage box
Name    Path
------  ------History0.0.1 - 2015-09-23Initial version
Package: docker-sync
# docker-syncHelper utility for configuration management tools like Chef and Puppet.Given a directory of config files (see theexampledirectory), docker-sync
will ensure that the running containers are kept in sync with the config files,
and will remove containers that no longer have a related config file.It’s a little bit opinionated: container links aren’t supported (tho they could
be in the future); all containers are detached.  The image a container is
instantiated from is compared to its tag in its appropriate registry, and the
pull is only done if the registry tag is different than the local tag (adocker
pullis slow even when there are no changes).In the future I may support [dogestry][dogestry] as an alternative (or companion
to) a traditional Docker registry.## installationpip install docker-syncOr from a clone:pip install -r requirements.txt
pip install .## example usagedocker-sync ./exampleor./docker_sync/cli.py ./example## optionsYou can add–no-pullto skip pulling images; very useful when you’re
iterating on your configs.## running testsnosetestsRequires nosetests and httpretty[dogestry]:https://github.com/blake-education/dogestry
Package: docker-tag-naming
MotivationWhen building complex docker ecosystems it’s important to uniquely tag each
docker build before pushing it to the registry. This allows you to move back
and forward in time by using different versions of the docker image, pin
the production/QA/staging environments to different tags, etc.Installation$ pip install --upgrade docker-tag-namingCommandsOne of the most interesting features which comes with usingdocker-tag-namingis that it’s now possible to query which tag is the latest in a specific branch:$ docker-tag-naming latest andresriancho/w3af develop
v112-01460cd-developAccording to our convention112is the version number,01460cdis thegitcommit ID anddevelopis the branch.It’s possible to manually forge a new version tag to be used in any registry
image:$ docker-tag-naming forge --version 332 --commit-id cd14580 --branch master
v332-cd14580-masterBut the most interesting feature is tobumpthe version:$ docker-tag-naming bump andresriancho/w3af develop --commit-id cd14580
v113-cd14580-developPlease note that113was created by retrieving the latest version tag from theandresriancho/w3afrepository and performing a+1.Continuous delivery usageThese are just a couple of examples to show how to usedocker-tag-namingwith
continuous delivery. First in the base image usebumpto tag and push the
version:$ export NEXT_TAG=`docker-tag-naming bump username/base-image ${BRANCH} --commit-id ${COMMIT_ID}`
$ docker tag username/base-image username/base-image:$NEXT_TAG
$ docker push username/base-image:$NEXT_TAGThen in the build where the base image is used, query the latest:$ export LATEST_TAG=`docker-tag-naming latest username/base-image develop`
$ render-compose --latest-base-image $LATEST_TAG
$ docker-compose upUsing these steps will guarantee that the latest available image is always used
in your builds.Authentication and private imagesIn order to list tag names from private imagesdocker-tag-namingrequires
credentials, these can be set using the environment variablesREGISTRY_USERandREGISTRY_PASS:$ export REGISTRY_USER=username
$ export REGISTRY_PASS=password
$ docker-tag-naming bump username/private develop --commit-id cd14580Important disclaimerThe docker registry/hub (https://registry.hub.docker.com/) seems to have a delay
between what’s shown through the web interface (your browser) and the REST API.
Take this into account when using these commands in continuous integration
scripts, since your recently pushed tags might not appear right away!A command that might help as a workaround isdocker-tag-naming refreshwhich
will query the API until a new version is available or the timeout is reached:$ docker-tag-naming refresh username/base-image develop
Initial version is v113-cd14580-develop , waiting for new release...
New version found: v114-5151bc0-develop

$ docker-tag-naming latest andresriancho/w3af develop
v114-5151bc0-developReporting bugsReport your issues and feature requests indocker-tag-naming’s issue
trackerand we’ll
be more than glad to fix them.Pull requests are more than welcome!Build status
Package: dockertarpush
FORK OFhttps://github.com/Razikus/dockerregistrypusher!
Credits go to original author.What is this?This package contains library dockertarpusher that allows to push image packed as tar (usually from docker save command) to docker registryUsage of library:from dockertarpusher import Registry

reg = Registry("http://localhost:5000", "tests/busybox.tar", login = "admin", password = "admin123")
reg.processImage()Runningdocker-tar-push {REGISTRYURL} {TARPATH} [login] [password] [--noSslVerify]Why?Because sometimes you will need only to repush image to registry, without full access to docker socket, docker client, so why then volume the whole socket?LicenseFree to use (MIT)
Package: dockertarpusher
What is this?This package contains library dockertarpusher that allows to push image packed as tar (usually from docker save command) to docker registryUsage of library:from dockertarpusher import Registry

reg = Registry("http://localhost:5000", "tests/busybox.tar", login = "admin", password = "admin123")
reg.processImage()Runningdocker-tar-push {REGISTRYURL} {TARPATH} [login] [password] [--noSslVerify]Why?Because sometimes you will need only to repush image to registry, without full access to docker socket, docker client, so why then volume the whole socket?LicenseFree to use (MIT)