Reduce Dockerfile size from 216Mi -> 50Mi

This commit is contained in:
Ashish Bhatia 2025-02-16 01:21:43 -08:00 committed by GitHub
parent b74a2626a9
commit b3a58b610f
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,14 @@
FROM python:3-alpine
FROM python:3-alpine AS base
RUN apk add --no-cache bash gcc musl-dev && \
pip install 'yamllint>=1.25.0' && \
pip install --root /yamllint 'yamllint>=1.25.0' && \
rm -rf ~/.cache/pip
FROM python:3-alpine AS builder
COPY --from=base /yamllint /yamllint
ENV PATH="/yamllint/usr/local/bin:${PATH}"
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]