I'm currently running a docker container for an ASP.NET Core WebAPI project. This web service is currently exposed on port 80.
My dockerfile looks like this:
FROM microsoft/dotnet:2.1-aspnetcore-runtime
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "testapi.dll"]
I'd like to install nginx as a layer between the service and the exposed public network.
The final result should be ASP.NET running on port 90 which is internal only and an nginx webserver forwarding the local 90 to public 80 port.
Is this possible? if so, how can I achieve such architecture? btw, I'm completely aware of the overhead caused by an extra layer.
Thanks!