Shrink the size of mythic_python_base#4
Shrink the size of mythic_python_base#4DarkC0ntributor wants to merge 2 commits intoMythicMeta:masterfrom
Conversation
Shrink size of python images from 1GB to ~200MB
|
Oh wow, that'll be super helpful! I'll do some testing to make sure it's not losing some functionality that agents are depending on (implicitly) for building, then i can pull it in |
|
This works nicely for this python image, but right now this This might be a useful as |
|
It's been quite a while since I played with C# but starting the _dotnet with RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install --no-install-recommends \
wget -y && \
apt-get purge -y && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean(installing wget, not copying it) I wanted to fix that by using a bookworm release instead of the buster one Maybe bookworm's mono works as well? Or of course base everything on If there where a special slim version, it could also be based on alpine. That would save another 100MB. However, alpine can be tricky. FROM python:3.11-alpine as base
ARG CA_CERTIFICATE
ARG NPM_REGISTRY
ARG PYPI_INDEX
ARG PYPI_INDEX_URL
ARG DOCKER_REGISTRY_MIRROR
ARG HTTP_PROXY
ARG HTTPS_PROXY
FROM base as builder
RUN apk add --update \
gcc \
g++ \
make \
musl-dev \
python3-dev \
libc6-compat \
linux-headers
RUN pip install mythic-container pycryptodome
FROM base
COPY --from=builder /usr/local/lib/python3.11/ /usr/local/lib/python3.11/ |
Shrink the size of python images from 1GB to ~200MB