Skip to main content

Amend Docker images by running a command in a separate layer.

Project description


Amend Docker images by running a command in a temporary container.

$ pipx install docker-amend  # (plain `pip` works too)


docker-amend lets you modify an IMAGE by running COMMAND inside a temporary container. You can use it to add dependencies to your project without rebuilding the whole image from ground.

This is basically docker run and docker commit in one go, but easier to use.


  • -t, --tag NAME[:VERSION]: Use a different name/tag for the resulting image.
  • -v, --volume SOURCE[:TARGET[:MODE]]: Bind mount a volume.
  • --no-cwd-volume: Do not mount current working directory as a volume. [default: False]
  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.


Let's say you're making a Python app:

$ docker build -t my-image .

... (some development goes on, then:)

$ docker-amend my-image poetry add requests
$ docker run my-image poetry show
requests         2.23.0     Python HTTP for Humans.
$ grep requests pyproject.toml
requests = ^2.23.0

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

docker-amend-0.1.2.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

docker_amend-0.1.2-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

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