Reputation: 6746
I have published a .NET 8 Api to my private Docker registry where my Azure App Service pulls from. Everything works perfectly, however, I am unsure how to mount a volume.
I created a storage account in Azure with a fileshare. In my app service, I have mounted it through path mappings on /files
. How do I mount this path as a volume now such that Docker is aware of it?
Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /App
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /App
COPY --from=build /App/out .
ENTRYPOINT ["dotnet", "DotNet.Docker.dll"]
Upvotes: 1
Views: 112
Reputation: 6746
Actually, I found out that there has to be nothing done further than mapping the path. So, no need to mount a volume or something. It is automatically available for the container.
Upvotes: 1