Skip to content

Commit 63a6fb8

Browse files
committed
Updates - including README with instructions
1 parent 4749de6 commit 63a6fb8

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

Dockerfile.linux

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ COPY --from=build /app ./
1818
ENV PORT 80
1919
EXPOSE 80
2020

21-
2221
# Start the app
2322
ENTRYPOINT ["dotnet", "dotnetcoresample.dll"]

Dockerfile.windows

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Start with the .NET SDK for building the app
22
# Using an explicit Windows Server tag
3+
# We are using Windows Nanoserver, a headless server for hosting apps with IIS
34
FROM mcr.microsoft.com/dotnet/sdk:6.0-nanoserver-ltsc2022 AS build
45
# Work within a folder named `/source`
56
WORKDIR /source

README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
1-
# .Net 6 Hello World
1+
# .NET 6 Hello World
22

3-
This sample demonstrates a tiny Hello World .NET Core app for [App Service Web App](https://docs.microsoft.com/azure/app-service-web).
3+
This sample demonstrates a tiny Hello World .NET Core app for [App Service Web App](https://docs.microsoft.com/azure/app-service-web). This sample can be used in a .NET Azure App Service app as well as in a Custom Container Azure App Service app.
4+
5+
## Log in to Azure Container Registry
6+
7+
Using the Azure CLI, log in to the Azure Container Registry (ACR):
8+
9+
```azurecli
10+
az acr login -n <your_registry_name>
11+
```
12+
13+
## Running in a Docker Container
14+
15+
This repository contains 2 Dockerfiles, a Linux container and a Windows container.
16+
17+
### Publish the Windows image to your Registry
18+
19+
To build the Windows image locally and publish to ACR, run the following command:
20+
21+
```docker
22+
docker build -f Dockerfile.windows -t dotnetcore-docs-hello-world-windows .
23+
docker tag dotnetcore-docs-hello-world-windows <your_registry_name>.azurecr.io/dotnetcore-docs-hello-world-windows:latest
24+
docker push <your_registry_name>.azurecr.io/dotnetcore-docs-hello-world-windows:latest
25+
```
26+
27+
### Publish the Linux image to your Registry
28+
29+
To build the Windows image locally and publish to ACR, run the following command:
30+
31+
```docker
32+
docker build -f Dockerfile.linux -t dotnetcore-docs-hello-world-linux .
33+
docker tag dotnetcore-docs-hello-world-windows <your_registry_name>.azurecr.io/dotnetcore-docs-hello-world-linux:latest
34+
docker push <your_registry_name>.azurecr.io/dotnetcore-docs-hello-world-linux:latest
35+
```
436

537
# Contributing
638

7-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
39+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

0 commit comments

Comments
 (0)