Dotnet Core 2.1 alpine Dockerfile

Venkata Chitturi
DevOps Process and Tools
1 min readNov 29, 2018

providing the dockerfile to build dotnet core 2.1 alpine with Nuget configuration and Jq installed.

FROM microsoft/dotnet:2.1-aspnetcore-runtime-alpine AS base
WORKDIR /app
FROM microsoft/dotnet:2.1-sdk-alpine AS build
WORKDIR /src
COPY NuGet.Config /root/.nuget/NuGet/NuGet.Config
RUN apk update \
&& apk add --no-cache curl \
&& apk add jq \
&& rm -rf /var/cache/apk/*

Note: You have to provide your own Nuget.config at the same level as this dockerfile and create the image using below command

docker build -t dotnet2.1-alpine Dockerfile

--

--

Venkata Chitturi
DevOps Process and Tools

DevOps Professional. Passionate on learning, implementing and sharing new things.