VOOZH about

URL: https://hub.docker.com/r/ubuntu/dotnet-deps

⇱ ubuntu/dotnet-deps - Docker Image


ubuntu/dotnet-deps

Verified Publisher

By Canonical

Updated 4 days ago

Chiselled Ubuntu for self-contained .NET & ASP.NET apps. Long-term tracks maintained by Canonical.

Image
Languages & frameworks
16

100K+

ubuntu/dotnet-deps repository overview

ubuntu/dotnet-deps is a rock for dotnet-deps maintained by Canonical.

The Chiselled Ubuntu for .NET Deps image is a clean base image for developers to layer their self-contained .NET and ASP.NET applications. Read the .NET documentation. It only includes the runtime dependencies required to run a standard self-contained .NET application: ca-certificates, libc6, libgcc, libssl3, libstdc++6, and zlib1g.

About chiselled Ubuntu containers

This image does not include bash nor a package manager. Read more about Chiselled Ubuntu for .NET, a new class of OCI images, on the Ubuntu blog.

Canonical and Microsoft partner together to deliver and support .NET on Ubuntu.

If you're looking for the .NET or the ASP.NET runtime images, please have a look at the ubuntu/dotnet-runtime and ubuntu/dotnet-aspnet repositories.

[Learn more about dotnet-deps]

Tags and Architectures

NOTE: These tags follow a specific naming convention that respects the concept of channels.

TagsSupported untilVersionBaseArchitectures
8.0-24.04_stable11/20268.024.04amd64, arm64, ppc64le, s390x
10.0-26.04_edge05/203110.026.04amd64, ppc64le, s390x, arm64

Get started

This rock's entrypoint is Pebble, a container-optimized init process that enables the orchestration of a collection of local service processes as an organized set.

[Learn more about Pebble]

Inspect

To view the Pebble services and checks defined in this rock:

docker run --rm ubuntu/dotnet-deps:9.0-25.04_stable plan
Run

To run this rock, use any of the usual container runtimes, for example, docker:

docker run --name dotnet-deps-container \
 -e TZ=UTC \
 ubuntu/dotnet-deps:9.0-25.04_stable

The container will start and then stop immediately, showing the following output:

2025-07-17T15:12:33.628Z [pebble] Started daemon.
2025-07-17T15:12:33.653Z [pebble] POST /v1/services 151.275µs 400 (http+unix)
2025-07-17T15:12:33.653Z [pebble] Cannot start default services: no default services

This is because the image is a rock, which has Pebble as the default entrypoint, and there are no default services defined in the rock.

Use as a base

In some cases, you may want to augment this rock with additional runtime dependencies. In that case, you can use this rock as a base for your own custom build, as exemplified below:

The main purpose of the dotnet-deps image is to provide all the basic dependencies for you to be able to layer a self-contained .NET or ASP.NET application on top of it.

For rocks (9.0-25.04 and later)
# Clone an existing sample of a .NET Core MVC web app
$ git clone https://github.com/Azure-Samples/dotnetcore-docs-hello-world
$ cd dotnetcore-docs-hello-world

# Let's make sure we use a commit that was designed to work with .NET10.0
$ git checkout 64b101351a364dd1e0c845b64013507e855a6e08

Create a Dockerfile with the following content:

FROM ubuntu:26.04 AS builder

# install the .NET 10 SDK from the Ubuntu archive
# (no need to clean the apt cache as this is an unpublished stage)
RUN apt-get update && apt-get install -y dotnet10 ca-certificates

# add your application code
WORKDIR /source
# using https://github.com/Azure-Samples/dotnetcore-docs-hello-world
COPY . .

# publish your ASP.NET app
RUN dotnet publish -c Release --self-contained true -o /app

FROM ubuntu/dotnet-deps:10.0-26.04_edge

WORKDIR /app
COPY --from=builder /app ./

CMD ["exec", "/app/dotnetcoresample"]

Build and run the image with the following commands:

$ docker build -t dotnet-hello-world .
$ docker run --rm -p 8080:8080 dotnet-hello-world

Access your web app at localhost:8080.

For Legacy images (6.0, 8.0, 9.0-24.10)
# Clone an existing sample of a .NET Core MVC web app
$ git clone https://github.com/Azure-Samples/dotnetcore-docs-hello-world
$ cd dotnetcore-docs-hello-world

# Let's make sure we use a commit that was designed to work with .NET8.0
$ git checkout 95b862ca3580c82835322d9eb45eb9ecfd731370

Create a Dockerfile with the following content:

FROM ubuntu:24.04 AS builder

# install the .NET 8 SDK from the Ubuntu archive
# (no need to clean the apt cache as this is an unpublished stage)
RUN apt-get update && apt-get install -y dotnet8 ca-certificates

# add your application code
WORKDIR /source
# using https://github.com/Azure-Samples/dotnetcore-docs-hello-world
COPY . .

# publish your ASP.NET app
RUN dotnet publish -c Release -o /app --self-contained false

FROM ubuntu.azurecr.io/dotnet-deps:8.0-24.04_stable

WORKDIR /app
COPY --from=builder /app ./

ENV PORT 8080
EXPOSE 8080

ENTRYPOINT ["dotnet", "/app/dotnetcoresample.dll"]

Build and run the image with the following commands:

$ docker build -t dotnet-hello-world .
$ docker run --rm -p 8080:8080 dotnet-hello-world

Access your web app at localhost:8080.

Get logs

To view the logs of the running container, run:

docker exec dotnet-deps-container pebble logs

Or, for a specific service:

docker exec dotnet-deps-container pebble logs <service>
Monitor health checks

Rocks may have predefined health checks that you can list by running:

docker exec dotnet-deps-container pebble checks

The overall health of your container can be inspected via:

docker exec dotnet-deps-container pebble health

Configuration

Environment variables
OptionDescriptionDefault
TZSet the timezone for the containerUTC
DOTNET_SYSTEM_GLOBALIZATION_INVARIANTWhether to use invariant globalization mode.true
ASPNETCORE_URLSThe URLs that the ASP.NET Core app should listen on.http://+:8080

[Report a bug] [Contribute]

Canonical is the provider of this container image. It is the user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within, as well as with Canonical’s IP Policy.

Tag summary

10.0-26.04_edge

Content type

Image

Digest

sha256:b1e0e1def…

Size

11.1 MB

Last updated

4 days ago

docker pull ubuntu/dotnet-deps:10.0-26.04_edge

This week's pulls

Pulls:

1,040

Last week