Commit 1f3126a
committed
Optimize Docker test setup with BuildKit caching and Strauss detection
Add two performance optimizations for local Docker testing:
1. Strauss fork Docker detection
- Add isRunningInDocker() to PluginPackager to detect container environment
- Use /tmp for Strauss fork in Docker (no cross-drive issues on Linux)
- Skip fork cleanup in Docker since /tmp is ephemeral
- Maintains Windows compatibility (still uses target directory locally)
- Saves ~30 seconds per Docker test run
2. BuildKit cache mounts
- Enable DOCKER_BUILDKIT=1 in run-docker-tests.sh
- Add cache mounts for /var/cache/apt (downloaded packages)
- Add cache mount for /root/.composer/cache (PHPUnit dependencies)
- Intentionally exclude /var/lib/apt/lists to ensure fresh package indexes
- Cache auto-creates on first run, persists across builds
- Saves ~45-60 seconds on subsequent runs
Expected total savings: ~1-1.5 minutes per Docker test run after initial cache population.
No impact on GitHub Actions (uses separate GHA layer caching).1 parent 317751b commit 1f3126a
File tree
3 files changed
+67
-21
lines changed- bin
- infrastructure/src/Tooling
- tests/docker
3 files changed
+67
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
599 | 615 | | |
600 | 616 | | |
601 | 617 | | |
602 | 618 | | |
603 | 619 | | |
604 | 620 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | 621 | | |
609 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
610 | 634 | | |
611 | 635 | | |
612 | 636 | | |
| |||
619 | 643 | | |
620 | 644 | | |
621 | 645 | | |
622 | | - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
623 | 649 | | |
624 | 650 | | |
625 | 651 | | |
| |||
886 | 912 | | |
887 | 913 | | |
888 | 914 | | |
889 | | - | |
| 915 | + | |
| 916 | + | |
890 | 917 | | |
891 | 918 | | |
892 | 919 | | |
893 | | - | |
| 920 | + | |
894 | 921 | | |
895 | 922 | | |
896 | 923 | | |
| |||
904 | 931 | | |
905 | 932 | | |
906 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
907 | 937 | | |
908 | 938 | | |
909 | 939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
20 | | - | |
21 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | | - | |
29 | | - | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | | - | |
49 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | | - | |
52 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
| |||
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
65 | | - | |
66 | | - | |
| 76 | + | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
| |||
80 | 90 | | |
81 | 91 | | |
82 | 92 | | |
83 | | - | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
88 | | - | |
89 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
93 | | - | |
| 104 | + | |
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
| |||
0 commit comments