I have set up a Docker container with a web server on port 5000 (HTTP).
What doesn't work:
What does work:
curl http://localhost:5000
' and it returns HTMLThese tests prove that the web service is running and there are no firewall issues.
The Docker image was built with:
# syntax=docker/dockerfile:1
##This is the Long Time Support (LTS) version, runs on Debian (https://hub.docker.com/_/node)
FROM node:16.16.0
# install app dependencies
#Install .net (https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian)
##Add the Microsoft package signing key to your list of trusted keys and add the package repository.
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
##Install the runtime
RUN apt-get update && \
apt-get install -y aspnetcore-runtime-6.0
# install app
# final configuration
ENV Authentication__FB__ClientId=myKey
ENV Authentication__FB__ClientSecret=myKey
ENV Authentication__Google__ClientId=myKey.apps.googleusercontent.com
ENV Authentication__Google__ClientSecret=myKey
ENV Authentication__Microsoft__ClientId=myKey
ENV Authentication__Microsoft__ClientSecret=myKey
ENV SendGridKey=myKey
ENV StorageConnectionString__blob=DefaultEndpointsProtocol=https;AccountName=mysite;AccountKey=myKey==;BlobEndpoint=https://mysite.blob.core.windows.net/;TableEndpoint=https://mysite.table.core.windows.net/;QueueEndpoint=https://mysite.queue.core.windows.net/;FileEndpoint=https://mysite.file.core.windows.net/
ENV Stripe__PublishableApiKey=mySecret
ENV Stripe__SecretApiKey=mySecret
ENV Stripe__WebhookSecret=mySecret
ENV Url=localhost
ENV VaultUri=https://mysite.vault.azure.net/
EXPOSE 5000
I have also run within the container:
cd wwwroot
npm install
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
az login
dotnet Web.dll
The Container is started with both port 5000 mapped as port 5000.
Please can you let me know why I can't see the HTML page from my PC's web browser.
I had to enter this from bash:
dotnet Web.dll --urls "http://:5000;https://:5001"