Open
Description
Describe the Problem
With #6135, it's now possible to install new packages on top of an existing Ubuntu Chisel installation. Here's an example of what that might look like today:
You'll notice that about a third of the Dockerfile is dedicated to installing a specific version of chisel
.
Describe the Solution
We could use the go
CLI for installing the tool - e.g. go install github.com/canonical/chisel/cmd/chisel@<tag>
. But that would still require installing the go
package on top of the .NET SDK image.
If we included the chisel
tool in the .NET SDK image, then:
- This scenario would get a lot simpler.
- We could ensure that users end up using the same version of
chisel
that we used to build our own runtime-deps image.
The resulting user Dockerfile would then look something like this:
FROM mcr.microsoft.com/dotnet/nightly/sdk:10.0-preview-noble AS build
ARG TARGETARCH
# create new base image with additional packages
COPY --from=mcr.microsoft.com/dotnet/nightly/runtime-deps:10.0-preview-noble-chiseled / /rootfs/
# install additional packages onto the base image rootfs
RUN chisel cut --release ubuntu-24.04 --root /rootfs/ \
libicu74_libs \
tzdata-legacy_zoneinfo \
tzdata_zoneinfo
<All of the .NET app COPY, restore, and publish instructions>
FROM scratch AS final
# copy the base image
COPY --from=chisel /rootfs /
# copy app
COPY --from=build /app /app/
ENTRYPOINT ["/app/App"]
Additional Context
Related: #4811
Metadata
Assignees
Type
Projects
Status
Backlog