This repository contains a basic asp.net core 6.0 web app created as a docker image that can be published into the DeltaV Edge Environment. Using this template, you can quickly get started with developing apps for Edge!
This file is located in ~/EdgeGateway.HelloWorld/Dockerfile
. This file can be used to generate a docker image from a *.csproj
visual studio project.
To learn more about docker and dockerfiles, please refer to this page: Dockerfile reference | Docker Docs
This file is located in ~/EdgeGateway.HelloWorld/nginx.conf
. This configuration file is used by nginx to render the published asp.net web app.
To know more about the nginx config file, please refer to this page: Full Example Configuration | NGINX
Solution file EdgeGateway.HelloWorld.sln
and project file ~/EdgeGateway.HelloWorld/EdgeGateway.HelloWorld.csproj
.
This is the basic asp.net project we have set up to get started with.
- Open the
EdgeGateway.HelloWorld.sln
. - Run the project
EdgeGateway.HelloWorld
. - You should be able to load the hello world app without any external dependencies/configuration.
- Using VSCode, locate the
Dockerfile
, right click, and selectOpen in Integrated Terminal
. - Execute the command
docker build . -t simple-dockerapp-dotnet6
. - Docker will then try to download necessary images and build the app.
- Execute the command
docker run --rm -d -p 8011:80/tcp simple-dockerapp-dotnet6:latest
. - Finally, open
http://localhost:8011/
from your browser.
NOTE: If necessary, please run VSCode with Administrator privilege.