Skip to content

Commit

Permalink
README again
Browse files Browse the repository at this point in the history
  • Loading branch information
frantjc committed Jun 2, 2022
1 parent c1ed978 commit 0a72763
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Small script to pair with the Dockerfile `ADD` directive to make an idempotent a

A Dockerfile's `ADD` directive is a bit [finicky](https://docs.docker.com/engine/reference/builder/#add). It allows files to be added to the image either from a local directory or a remote URL. This has value in that if the `<src>` of the `ADD` is an `ARG`, then the functionality of the `ADD` can be changed with build-time arguments.

For example, this allows development to lazily get the latest version of the dependency from a tar archive at some remote URL while CI consistently downloads the same tar archive and passes it to the Dockerfile as a `--build-arg`.
For example, this allows developers to lazily get the latest version of the dependency from a tar archive at some remote URL while CI consistently supplies the same tar archive to the Dockerfile as a `--build-arg`.

However, if that `<src>` is expected to be either a local tar archive or a remote tar archive, the `ADD` directive is not idempotent; subsequent Dockerfile directives would have to account for this difference.

## usage
However, if that `<src>` is expected to be either a local tar archive or a remote tar archive, the `ADD` directive is not idempotent; `ADD` unpacks local tar archives but not remote ones. As a result, subsequent Dockerfile directives would have to account for the difference to make the build successful.

This is where the ADDendum comes in:

## usage

```Dockerfile
ARG zip=zip_3.0_x86_64.tgz
ADD ${zip} /usr/local/bin
Expand Down

0 comments on commit 0a72763

Please sign in to comment.