Skip to main content

Docker Utils with Python

Project description

PyPI version Build Status Dependency Status Code Climate


  • Docker images have Base Images, and a Base Image also has another Base image.
  • You may want to re-build ImageA before building ImageB which will be built based on ImageA.

Pyocker enables static definition of Dockerfile dependencies and selective build/push of docker images.


  • [ ] Enable use of Dockerfiles in user-selected directories for each image
  • [ ] Integration with dockerfile_composer
  • [ ] Registry authentication
  • [ ] Check if actual dependency described in Dockerfiles match dependency definitions
  • [ ] Add comments
  • [ ] Loggin into files


  • Docker


pip install pyocker



pyocker build --file docker-dependency.yml            # Basic
pyocker build --file docker-dependency.yml --dry-run  # Dry-Run


Usage: pyocker build [OPTIONS]

  --file TEXT          Path to config file [default="docker-dependency.yml"]
  --verbose / --quiet  Make lots of noise or not [default=verbose]
  --dry-run            Dry Run
  -h, --help           Show this message and exit.


# Built-in variables:
# * $date - current date in format ``
registry:                 # name of public|private registry
images:                   # Required
    name: fluentd         # Required
    tags:                 # Tags to build with
      - latest
      - production
      - development
    use_cache: yes        # Disable `--no-cache` option  [default: yes]
    build: no
    push: no
    name: my-image
      - $date-dev         # Using a built-in variable
    use_cache: no
    build: yes
    push: yes
    dependencies:         # Images required by `my-image`
        name: base-image1
          - latest
        use_cache: yes
        build: yes
        push: no
        name: base-image2
          - latest
        use_cache: yes
        build: yes
        push: no



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyocker, version 0.2.7
Filename, size File type Python version Upload date Hashes
Filename, size pyocker-0.2.7.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page