Skip to main content


Project description

Build Status codecov

Patchwork Docker


Allows a Docker build to be easily changed, without having to clone and modify an existing build repository.


All with a single command, the tool can:

  • Build images from a different base image.
  • Add/override files in the build context.
  • Apply patches to the Dockerfile or other files in the build context.
  • Define a different Dockerfile.

Use Cases

A few basic use cases (./ can be used instead of patchworkdocker):

  • To change a base image from debian:stretch to python:3.7-stretch so as to get the latest version of Python in the image with no hassle:
    patchworkdocker build example:1.0.0 \
        --base-image python:3.7-stretch
  • Add an alternate Dockerfile to a pre-existing context:
    patchworkdocker build example:1.0.0 \
        --additional-file Dockerfile:Dockerfile.example \
        --dockerfile Dockerfile.example
  • Change the URL of a piece of software that gets installed into a Docker image:
    patchworkdocker build example:1.0.0 \
        --dockerfile 3.7/stretch/Dockerfile \
        --patch change-install-url.patch:Dockerfile

Raspberry Pi users may find this tool particularly useful as, outside the official images, there is often need to change image build in order to get them to work on the non-standard rpi architectures.



  • Docker
  • Python 3.7+ (optional, as can be run entirely from Docker if you don't have Python 3.7)

The tool can be installed directly from GitHub:

pip install git+


Up-to-date usage information can be seen with:

patchworkdocker --help
patchworkdocker build --help

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 patchworkdocker, version 0.0.0
Filename, size File type Python version Upload date Hashes
Filename, size patchworkdocker-0.0.0.tar.gz (12.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page