Skip to main content

TODO

Project description

Build Status codecov

Patchwork Docker

Purpose

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

Features

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 (./docker-run.sh 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 https://github.com/example/docker-example.git \
        --base-image python:3.7-stretch
    
  • Add an alternate Dockerfile to a pre-existing context:
    patchworkdocker build example:1.0.0 https://github.com/example/docker-example.git \
        --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 https://github.com/docker-library/python.git \
        --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.

Installation

Prerequisites

  • 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+https://github.com/colin-nolan/patchwork-docker@master#egg=patchworkdocker

Usage

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.

Source Distribution

patchworkdocker-0.0.0.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file patchworkdocker-0.0.0.tar.gz.

File metadata

  • Download URL: patchworkdocker-0.0.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.2

File hashes

Hashes for patchworkdocker-0.0.0.tar.gz
Algorithm Hash digest
SHA256 ec0010e8bc835b8b3a162aedc0b73480d7834b5a2defeb77b8df87a6cfeda4f7
MD5 005d0dc9e9497fabb973585fd4b4f0b9
BLAKE2b-256 fc41f59dd4ee15c74d475456a926e0f1813474ff428bb9f6d5847f3e2ffa95f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page