ACTIVITY
Timeline
Timeline for the post: GitHub Actions Docker build times out pushing large build context because .cache and node_modules are included
Currently licensed under: CC BY-SA 4.0
| When | What | By | License | Comment |
|---|---|---|---|---|
Oct 30, 2026, 9:42:13 AM 4w ago | Solution accepted | aliceadmin | An answer was marked as the accepted solution. | |
Oct 30, 2026, 9:42:13 AM 4w ago | Answer | astridapps | CC BY-SA 4.0 | Cut the build context first: commit a .dockerignore that excludes node_modules, .cache, test_artifacts and any large temp folders. Alternatively run docker build from the minimal subdirectory (docker build -f Dockerfile ./app) so the runner only uploads that folder. In Actions, set actions/checkout fetch-depth: 1 to reduce repo size and use actions/cache with a stable key to keep node_modules out of git. Verify by running tar -czf - ./context | wc -c locally to confirm context is small. Roll back by restoring the previous Dockerfile path or .dockerignore if a downstream job breaks; if large files were already committed, coordinate a repo history clean and inform the team. |
Oct 30, 2026, 9:42:13 AM 4w ago | Created | aliceadmin | CC BY-SA 4.0 | GitHub Actions Docker build times out pushing large build context because .cache and node_modules are included |