Added a Multi-stage Dockerfile for the Go-based CLI #45
Merged
Conversation
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.
Addressing #25
build stage uses
golang:1.26-alpineas base image and installs gcc and musl-dev for CGO support which is required by github.com/mattn/go-sqlite3, then compiles the binary withCGO_ENABLED=1and-tags no_guito produce a CLI build.build-release stage uses alpine:latest as the base minimal runtime image, copies the compiled binary and exposes port 7700
Final image size came out to be 26.77 MB
Build the image using:
docker build -t eko-cli .Run the container using:
docker run --name <desired name of your choosing> eko-cliA help menu will be shown to you. Displayed CLI commands can be run using:
docker run --name <desired name of your choosing> eko-cli /eko <listed command argument(ex: init)>After reviewing the codebase, there is no HTTP server implementation. internal/api/ contains only diffing logic, and the CLI communicates with the UI exclusively via Wails bindings.