Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
FROM --platform=$BUILDPLATFORM docker.io/library/golang:alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.22-bookworm AS builder

WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY ./ /app

ARG TARGETARCH
RUN CGO_ENABLED=0 GOARCH=$TARGETARCH go build -trimpath -ldflags '-w -s' -o bin/main .
ARG TARGETOS
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -trimpath -ldflags "-w -s" -o /app/bin/main .

FROM docker.io/library/alpine:latest
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl python3 python3-pip nodejs npm \
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package curl is installed but may not be necessary for the application's runtime. Consider removing it if it's not actively used, as it increases the attack surface and image size.

Suggested change
ca-certificates curl python3 python3-pip nodejs npm \
ca-certificates python3 python3-pip nodejs npm \

Copilot uses AI. Check for mistakes.
&& rm -rf /var/lib/apt/lists/*
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Alpine version used uv (a fast Python package installer), but the Debian version installs python3-pip instead. If uv was intentionally chosen for performance or specific functionality, consider installing it explicitly in the Debian image to maintain equivalent functionality.

Suggested change
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& curl -Ls https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz -o /tmp/uv.tar.gz \
&& tar -xzf /tmp/uv.tar.gz -C /tmp \
&& mv /tmp/uv /usr/local/bin/uv \
&& chmod +x /usr/local/bin/uv \
&& rm /tmp/uv.tar.gz

Copilot uses AI. Check for mistakes.

RUN apk add --no-cache nodejs npm python3 uv
COPY --from=builder /app/bin/main /usr/local/bin/mcp-auth-proxy
ENV DATA_PATH=/data

Expand Down