Skip to content

Commit

Permalink
refs platform/#2581: keep documentation and completer in the final image
Browse files Browse the repository at this point in the history
  • Loading branch information
Monska85 committed Dec 13, 2023
1 parent a5e477c commit aa6b6d2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@ RUN unzip -q dist/awscli-exe.zip
RUN aws/install --bin-dir /aws-cli-bin
RUN /aws-cli-bin/aws --version

# Reduce image size: remove autocomplete and examples
RUN rm -rf \
/usr/local/aws-cli/v2/current/dist/aws_completer \
/usr/local/aws-cli/v2/current/dist/awscli/data/ac.index \
/usr/local/aws-cli/v2/current/dist/awscli/examples

RUN find /usr/local/aws-cli/v2/current/dist/awscli/data -name completions-1*.json -delete
RUN find /usr/local/aws-cli/v2/current/dist/awscli/botocore/data -name examples-1.json -delete

FROM alpine:${ALPINE_VERSION}

LABEL org.opencontainers.image.source https://github.com/${AUTHOR}/${IMAGE_NAME}

RUN apk add --no-cache groff

# Install AWS CLI v2 using the binary created in the builder stage
COPY --from=builder /usr/local/aws-cli/ /usr/local/aws-cli/
COPY --from=builder /aws-cli-bin/ /usr/local/bin/
Expand Down

0 comments on commit aa6b6d2

Please sign in to comment.