-
Notifications
You must be signed in to change notification settings - Fork 1
[44] Add Docker image build testing to CI workflow #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@jakubmanczak 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: jakubmanczak <56172798+jakubmanczak@users.noreply.github.com>
|
@copilot What are some bugs or errors that checking docker builds prevents here? |
Based on this repository's specific setup, Docker build testing catches several types of errors that Build Script Dependencies: The System Dependencies: The app uses Multi-stage Build Issues: The Dockerfile copies the binary from the build stage to the final Alpine image. If the binary name or path changes, or if there are permission issues with the Bind Mount Dependencies: The Dockerfile uses complex bind mounts for Docker Compose Integration: The compose file references the These are all real failure scenarios specific to this codebase that would only surface during Docker builds, not during standard Rust compilation. |
|
This PR introduces testing the building of docker images to the repository. This seems like a good thing to have for when we start releasing things you can actually install, but it will probably double the use of the limited free CI resources GitHub provides. Hence the question: whether or not to hold off on merging. @Mateusz-Dobrzynski |
|
There's a long way ahead of us before we start making actual releases. I'd rather we held off for now. |
This PR adds Docker image build testing to the existing GitHub Actions workflow to ensure that Docker images can be built successfully alongside the existing Rust compilation and unit tests.
Changes Made
.github/workflows/rust.ymldocker build -t tau:test .- Tests that the Dockerfile builds successfullydocker compose build server-prod- Tests that the Docker Compose configuration builds the production serviceWhy This Matters
Docker builds can fail even when
cargo buildsucceeds due to:By testing Docker builds in CI, we catch these issues early and ensure that the containerized application can be built reliably across different environments.
Implementation Details
The changes are minimal and surgical - only 5 new lines added to the existing workflow. The Docker build steps run after the successful completion of Rust compilation and tests, following the existing failure-fast approach where any step failure stops the workflow.
Both the direct Dockerfile build and the Docker Compose build are tested to ensure compatibility with both deployment methods documented in the README.
Fixes #44.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.