Dockerization of ASP.NET Application requires a Dockerfile for configuration and running it as a docker container.
FROM microsoft/dotnet:latest
RUN apt-get update && apt-get install sqlite3 libsqlite3-dev
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
RUN npm install && npm run postscript
RUN bower install
RUN ["dotnet", "ef", "database", "update"]
EXPOSE 5000/tcp
ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"]
A nuget feed configuration file helps in retrieving from the correct source. The usage of this file depends on the current configuration of the project and can change to suite project's requirement.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
<packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>