-
Notifications
You must be signed in to change notification settings - Fork 2
Migrate Docker from Alpine to Debian with multi-arch builds and cross-compilation #7
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
Conversation
Co-authored-by: elasticdotventures <[email protected]>
Co-authored-by: elasticdotventures <[email protected]>
|
@copilot review the errors |
…tion setup Co-authored-by: elasticdotventures <[email protected]>
Fixed several issues in the workflow files:
Changes in commit 4ab4766. |
|
@copilot update the documentation with a sample of how to use the mcp server with docker or pkgx in mcp.json ("mcpServers") |
Co-authored-by: elasticdotventures <[email protected]>
Added comprehensive Docker and pkgx MCP configuration examples to the README: Docker examples:
pkgx examples:
All examples include complete mcp_settings.json configuration snippets ready to use with VSCode/RooCode MCP clients. Changes in commit 8e678d6. |
Signed-off-by: Brian Horakh <[email protected]>
Update Docker and CI/CD Configuration
This PR updates the Docker configuration from Alpine to Debian and adds comprehensive CI/CD workflows.
Changes completed:
Summary of changes:
Dockerfile:
apktoapt-getdocker/entrypoint.sh:
set -eutoset -efor more flexible error handlingCI Workflow (.github/workflows/ci.yml):
Release Workflow (.github/workflows/release-and-publish.yml):
README.md:
mcp_settings.jsonconfiguration snippets ready to useRecent fixes:
This pull request was created as a result of the following prompt from Copilot chat.
Original prompt
Create a new branch named release/ghcr-debian-cross from main and commit the following changes. Open a pull request targeting main with the title above and a descriptive body summarizing the changes.
Files to add/update (exact contents):
FROM rust:1.91.1-slim-bullseye AS builder
RUN apt-get update && apt-get install -y
build-essential
pkg-config
libssl-dev
git
ca-certificates
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
Cache dependency compilation
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo fetch
RUN rm -rf src
Copy the full source tree
COPY . .
RUN cargo build --locked --release --bin cratedocs
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y ca-certificates libssl1.1 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/cratedocs /usr/local/bin/cratedocs
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8080
ENV CRATEDOCS_MODE=http
CRATEDOCS_ADDRESS=0.0.0.0:8080
CRATEDOCS_DEBUG=false
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/sh
set -e
docker/entrypoint.sh - small wrapper to start cratedocs with the configured mode
MODE="${CRATEDOCS_MODE:-http}"
ADDRESS="${CRATEDOCS_ADDRESS:-0.0.0.0:8080}"
DEBUG="${CRATEDOCS_DEBUG:-false}"
If explicit args provided, run with those
if [ "$#" -gt 0 ]; then
exec /usr/local/bin/cratedocs "$@"
fi
default behavior: start in selected mode
case "$MODE" in
http)
if [ "${DEBUG}" = "true" ]; then
exec /usr/local/bin/cratedocs http --address "$ADDRESS" --debug
else
exec /usr/local/bin/cratedocs http --address "$ADDRESS"
fi
;;
stdio)
exec /usr/local/bin/cratedocs stdio
;;
*)
echo "Unknown CRATEDOCS_MODE: $MODE" >&2
exit 2
;;
esac
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
name: Release & Publish (GHCR + cross-compiled binaries)
on:
push:
tags:
- 'v*'
workflow_dispatch: {}
permissions:
contents: read
packages: write
jobs:
build-push-and-release:
name: Build, Push Docker, Create Release, Upload Binaries
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout (full history & tags)
uses: actions/checkout@v4
with:
fetch-depth: 0
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.