[FEAT] Add Dockerfile for API#59
Merged
Merged
Conversation
nazarli-shabnam
approved these changes
Mar 24, 2026
Member
|
Well done buds! |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial containerization support for the Go API service by introducing a multi-stage Docker build and a reduced Docker build context, enabling the API to be built and run as a container image.
Changes:
- Added
api/Dockerfilewith a multi-stage Go build and Alpine runtime stage (non-root user, migrations included, port 8080 exposed). - Added
api/.dockerignoreto exclude VCS/IDE files, binaries, and environment files from the Docker build context.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| api/Dockerfile | Multi-stage build for compiling the Go API binary and packaging it with migrations into a minimal runtime image. |
| api/.dockerignore | Reduces Docker build context to improve build performance and avoid copying local/dev artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds initial Docker support for the API service by introducing a production-ready
Dockerfileand a corresponding.dockerignorefile. These changes enable efficient and secure containerization of the Go application.Docker support and containerization:
.dockerignorefile to exclude unnecessary files and directories (such as.git, IDE settings, environment files, and documentation) from the Docker build context, improving build performance and security.Dockerfilefor building and running the Go API:Closes #58