-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5214fb
commit a550f91
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,23 @@ | ||
Docker Compose + Github Actions + Layers Cache | ||
Docker Compose + GitHub Actions + Layers Cache | ||
=== | ||
|
||
Example project. | ||
Decrease build time of docker compose inside GitHub Actions using layers cache. | ||
|
||
2x faster builds: | ||
|
||
![Image of Build time](./.github/build_time.png) | ||
|
||
## Description | ||
|
||
* `.github/workflows/not-cached.yml` uses `./docker-compose.ci.not-cached.yml` | ||
* `.github/workflows/cached.yml` uses `./docker-compose.yml`. Caching achieved by: | ||
* ENV variables `DOCKER_BUILDKIT` and `COMPOSE_DOCKER_CLI_BUILD` | ||
* docker/setup-buildx-action | ||
* --build-arg BUILDKIT_INLINE_CACHE=1 | ||
* `cache_from` inside docker-compose file: | ||
```yml | ||
build: | ||
context: ./app1 | ||
cache_from: | ||
- ghcr.io/cyanofresh/docker-compose-ga-cache-example_app1 | ||
``` |