You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a way to make a small docker image, similar to what you can do in go with static compilation.
But I want to use --stdlib:dotnet and make it as small as possible.
I got --stdlib:zero to work but its no where near the 4kB (whole image is 4.3MB):
FROM bitnami/minideb AS builder
RUN apt-get update && apt-get install -y wget libc++1-13
ARG BFLAT_VERSION=8.0.2
WORKDIR /opt/bflat
RUN wget -O- https://github.com/bflattened/bflat/releases/download/v${BFLAT_VERSION}/bflat-${BFLAT_VERSION}-linux-glibc-x64.tar.gz | tar -xzvf-
ENV PATH="$PATH:/opt/bflat"WORKDIR /src
RUN echo 'System.Console.WriteLine("Hello bflat");' > hello.cs
RUN bflat build --stdlib:zero hello.cs
FROM busybox:glibc
COPY --from=builder /src/hello /hello
CMD /hello
Does anyone know how to make this work?
Or knows any Projects or Examples out there.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking for a way to make a small docker image, similar to what you can do in go with static compilation.
But I want to use
--stdlib:dotnet
and make it as small as possible.I got
--stdlib:zero
to work but its no where near the 4kB (whole image is 4.3MB):Does anyone know how to make this work?
Or knows any Projects or Examples out there.
Thx
Beta Was this translation helpful? Give feedback.
All reactions