Skip to content

Commit

Permalink
feat: Added distroless support and updated README
Browse files Browse the repository at this point in the history
- Added distroless dockerfile for minimal image
- Updated README with distroless build and usage instructions
  • Loading branch information
pradhans0906 committed Dec 7, 2024
1 parent 2d868f6 commit 7684364
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Distroless
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build stage
FROM debian:12-slim AS builder
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Get copa_version arg
ARG copa_version=0.9.0

# Install required packages for downloading and extracting Copa
RUN apt-get update && \
apt-get install -y \
curl \
tar \
ca-certificates \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*

# Download and extract Copa
RUN curl --retry 5 -fsSL -o copa.tar.gz https://github.com/project-copacetic/copacetic/releases/download/v${copa_version}/copa_${copa_version}_linux_amd64.tar.gz && \
tar -zxvf copa.tar.gz && \
chmod +x copa

# Final stage
FROM gcr.io/distroless/static

# Copy required components
COPY --from=builder /copa /usr/local/bin/copa
COPY --from=docker:24.0-cli /usr/local/bin/docker /usr/local/bin/docker
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENTRYPOINT ["/usr/local/bin/copa", "patch"]
CMD ["--help"]

0 comments on commit 7684364

Please sign in to comment.