Coder Social home page Coder Social logo

frbar / azure_wincontainer_fileshare_poc Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 735 KB

Azure App Service with Windows Container and File Share (Preview Feature PoC)

ASP.NET 0.90% C# 2.32% CSS 0.15% Dockerfile 0.09% JavaScript 96.53%
app-service azure file-share windows-container

azure_wincontainer_fileshare_poc's Introduction

Azure App Service with Windows Container and File Share

Feature is in preview at the moment (2021-04-14) and requires Premium V3 app service.

Pre-requisities

In Azure subscription:

  • Azure Container Registry
  • Azure Storage Account

On local:

  • VS 2019 + .NET Framework 4.8
  • Docker for Windows
  • az cli

Build Docker Image

In VS 2019, build the solution and publish it to folder: bin\app.publish

Using Windows Terminal, from Frbar.Azure.WinContainerFileShare.Api folder:

docker build . -t aci-fileshare-poc
docker images
docker run -d -p 8080:80 aci-fileshare-poc

Check that the app is up and running by browsing http://localhost:80.

Push Docker Image

az login
az account set --subscription "<MSDN subscription ID>"
az acr login --name "<Azure Container Registry Name>"
docker tag <Azure Container Registry Name>.azurecr.io/aci-fileshare-poc:v1
docker push <Azure Container Registry Name>.azurecr.io/aci-fileshare-poc:v1

Run the Container

  • From the Azure portal, create an Azure App Service with Windows Container using the pushed image. It has to be Premium Tier, V3.

App Service - Container Settings

  • Mount the File Share with mount path '/mount' (will be c:/mount from the application perspective).

Azure Storage Mount

Accessing the File Share

Using the standard .net API, files/directories can be accessed like from any local directory.

Azure Storage Mount

Azure Storage Mount

Documentation

azure_wincontainer_fileshare_poc's People

Contributors

frbar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.