Compare commits

...

2 Commits

Author SHA1 Message Date
Nelson Wolf
9de1db382a
Merge 67fd9409c79d4cdd538a5898696878d69a8e631b into 84ad562665bb303b549fec655d1b64f9945f3f91 2025-03-28 16:38:33 +00:00
Nelson Wolf
67fd9409c7
Further .dockerignore clarification
Signed-off-by: Nelson Wolf <wolfprime@gmail.com>
2025-03-28 09:38:30 -07:00

View File

@ -80,12 +80,13 @@ jobs:
tags: user/app:latest
```
Be careful because **any file mutation in the steps that precede the build step
will be ignored. Additionally the `.dockerignore` file is not used and can only be utilized by using path context.** since
the context is based on the Git reference. However, you can use the
[Path context](#path-context) using the [`context` input](#inputs) alongside
the [`actions/checkout`](https://github.com/actions/checkout/) action to remove
this restriction.
**Important Considerations for Git Context**
* **File Mutations** perfomred during your workflow will **not** be reflected in the final Docker image.
* **.dockerignore** is ignored altogether when using git context.
You can remove these limitations by using the [path context](#path-context) input alongside the [`actions/checkout`](https://github.com/actions/checkout/) action.
Default Git context can also be provided using the [Handlebars template](https://handlebarsjs.com/guide/)
expression `{{defaultContext}}`. Here we can use it to provide a subdirectory