Giter Site home page Giter Site logo

azure-container-samples's Introduction

Azure-Container-Samples

Sample showing how to create an azure container instance based on a blob trigger.

This is a simple Azure Function written in Powershell that demonstrates how to spin up a simple Node.js web app in a container instance using an image that has already been uploaded to the Azure Container Registry.

Running Locally

  1. Be sure to follow the prerequisites outlined in the Micirosoft article: https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-powershell
  2. Once your environment is set up, clone this repository and create a local.settings.json file containing your Azure secrets.

local settings json

  1. You should now be ready to run the function locally by clicking F5 in VS Code.

  2. Once the function is running, go to your Azure storage account, find the folder you designated in the function.json file, and upload any file.

  3. The function should now execute and create a container group and container instance accordingly.

  4. When the function finishes, you can go to your Azure portal container instances and note the FQDN of your container instance.

  5. Enter the address in your browser with port 3000 as follows:

    http://FQDN:3000/

Creating a Container Image

Although you can use any container image you would like, I have created a separate repo where you can clone a simple Node.js application image.
(This is the Docker getting-started image modified to upload to Azure Container Registry.)

Clone this repo to get the image: https://github.com/mkornegay/getting-started

You can get a fresh copy of the repo from the source in the Docker Getting Started documentation. https://github.com/docker/getting-started.git

azure-container-samples's People

Contributors

mkornegay 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.