Skip to content

Commit 30908ac

Browse files
Enable Docker BuildKit for faster image builds
Enables BuildKit in both CI and local development: - Set DOCKER_BUILDKIT=1 in GitHub Actions workflow - Set DOCKER_BUILDKIT=1 in Rakefile for local runs Benefits: - Faster image builds with improved layer caching - Better build output with progress information - Parallel build stage execution - More efficient use of build cache across runs - Better handling of multi-stage builds BuildKit is Docker's next-generation build system and is now the default in Docker Desktop and newer Docker versions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent 03246a7 commit 30908ac

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/ruby.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ jobs:
1515
ruby-version: 3.4
1616
bundler-cache: true
1717
- name: Run test
18+
env:
19+
DOCKER_BUILDKIT: 1
1820
run: bundle exec rake

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
require 'rake'
22
require 'rspec/core/rake_task'
33

4+
# Enable Docker BuildKit for faster builds with better caching
5+
ENV['DOCKER_BUILDKIT'] = '1'
6+
47
task :spec => 'spec:all'
58
task :default => :spec
69

0 commit comments

Comments
 (0)