From cd916ef54ecf0ac0f3f932ed2b7210707468287c Mon Sep 17 00:00:00 2001 From: Justin Yoo Date: Mon, 19 Aug 2024 21:15:26 +0900 Subject: [PATCH] Initial code commit (#1) --- .editorconfig | 372 ++++++++++++++++++ AzFuncContainer.sln | 28 ++ Directory.Build.props | 11 + FunctionAppWithDockerfile/.dockerignore | 1 + FunctionAppWithDockerfile/.gitignore | 264 +++++++++++++ .../.vscode/extensions.json | 5 + FunctionAppWithDockerfile/Dockerfile | 14 + .../FunctionAppWithDockerfile.csproj | 36 ++ .../HttpExampleTrigger.cs | 23 ++ FunctionAppWithDockerfile/Program.cs | 13 + .../Properties/launchSettings.json | 9 + FunctionAppWithDockerfile/host.json | 12 + FunctionAppWithDockerfile/local.settings.json | 7 + FunctionAppWithMSBuild/.gitignore | 264 +++++++++++++ .../.vscode/extensions.json | 5 + .../FunctionAppWithMSBuild.csproj | 45 +++ FunctionAppWithMSBuild/HttpExampleTrigger.cs | 23 ++ FunctionAppWithMSBuild/Program.cs | 13 + .../Properties/launchSettings.json | 9 + FunctionAppWithMSBuild/host.json | 12 + FunctionAppWithMSBuild/local.settings.json | 7 + README.md | 138 ++++++- global.json | 5 + 23 files changed, 1314 insertions(+), 2 deletions(-) create mode 100644 .editorconfig create mode 100644 AzFuncContainer.sln create mode 100644 Directory.Build.props create mode 100644 FunctionAppWithDockerfile/.dockerignore create mode 100644 FunctionAppWithDockerfile/.gitignore create mode 100644 FunctionAppWithDockerfile/.vscode/extensions.json create mode 100644 FunctionAppWithDockerfile/Dockerfile create mode 100644 FunctionAppWithDockerfile/FunctionAppWithDockerfile.csproj create mode 100644 FunctionAppWithDockerfile/HttpExampleTrigger.cs create mode 100644 FunctionAppWithDockerfile/Program.cs create mode 100644 FunctionAppWithDockerfile/Properties/launchSettings.json create mode 100644 FunctionAppWithDockerfile/host.json create mode 100644 FunctionAppWithDockerfile/local.settings.json create mode 100644 FunctionAppWithMSBuild/.gitignore create mode 100644 FunctionAppWithMSBuild/.vscode/extensions.json create mode 100644 FunctionAppWithMSBuild/FunctionAppWithMSBuild.csproj create mode 100644 FunctionAppWithMSBuild/HttpExampleTrigger.cs create mode 100644 FunctionAppWithMSBuild/Program.cs create mode 100644 FunctionAppWithMSBuild/Properties/launchSettings.json create mode 100644 FunctionAppWithMSBuild/host.json create mode 100644 FunctionAppWithMSBuild/local.settings.json create mode 100644 global.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..055923f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,372 @@ +root = true + +# All files +[*] +indent_style = space + +#### Core EditorConfig Options #### + +# Indentation and spacing +indent_size = 4 +tab_width = 4 + +# New line preferences +end_of_line = crlf +insert_final_newline = false + +# XML files +[*.{xml,csproj,targets,props}] +indent_size = 2 + +# JSON files +[*.{json,jsonc}] +indent_size = 2 + +# YAML files +[*.{yaml,yml}] +indent_size = 2 + +# C# files +[*.cs] + +#### .NET Coding Conventions #### +[*.{cs,vb}] + +# Organize usings +dotnet_separate_import_directive_groups = true +dotnet_sort_system_directives_first = true +file_header_template = unset + +# this. and Me. preferences +dotnet_style_qualification_for_event = false:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_property = false:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Expression-level preferences +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_object_initializer = true:suggestion +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_return = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion + +# Field preferences +dotnet_style_readonly_field = true:warning + +# Parameter preferences +dotnet_code_quality_unused_parameters = all:suggestion + +# Suppression preferences +dotnet_remove_unnecessary_suppression_exclusions = none + +#### C# Coding Conventions #### +[*.cs] + +# var preferences +csharp_style_var_elsewhere = false:silent +csharp_style_var_for_built_in_types = false:silent +csharp_style_var_when_type_is_apparent = false:silent + +# Expression-bodied members +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_prefer_switch_expression = true:suggestion + +# Null-checking preferences +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_prefer_static_local_function = true:warning +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent + +# Code-block preferences +csharp_prefer_braces = true:silent +csharp_prefer_simple_using_statement = true:suggestion + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# 'using' directive preferences +csharp_using_directive_placement = outside_namespace:silent + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +#### Naming styles #### +[*.{cs,vb}] + +# Naming rules + +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion +dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces +dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase + +dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion +dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters +dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase + +dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods +dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties +dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.events_should_be_pascalcase.symbols = events +dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables +dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase + +dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants +dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase + +dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion +dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters +dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase + +dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields +dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion +dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields +dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase + +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase + +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums +dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase + +# Symbol specifications + +dotnet_naming_symbols.interfaces.applicable_kinds = interface +dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interfaces.required_modifiers = + +dotnet_naming_symbols.enums.applicable_kinds = enum +dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.enums.required_modifiers = + +dotnet_naming_symbols.events.applicable_kinds = event +dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.events.required_modifiers = + +dotnet_naming_symbols.methods.applicable_kinds = method +dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.methods.required_modifiers = + +dotnet_naming_symbols.properties.applicable_kinds = property +dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.properties.required_modifiers = + +dotnet_naming_symbols.public_fields.applicable_kinds = field +dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_fields.required_modifiers = + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_fields.required_modifiers = + +dotnet_naming_symbols.private_static_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_fields.required_modifiers = static + +dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum +dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types_and_namespaces.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +dotnet_naming_symbols.type_parameters.applicable_kinds = namespace +dotnet_naming_symbols.type_parameters.applicable_accessibilities = * +dotnet_naming_symbols.type_parameters.required_modifiers = + +dotnet_naming_symbols.private_constant_fields.applicable_kinds = field +dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_constant_fields.required_modifiers = const + +dotnet_naming_symbols.local_variables.applicable_kinds = local +dotnet_naming_symbols.local_variables.applicable_accessibilities = local +dotnet_naming_symbols.local_variables.required_modifiers = + +dotnet_naming_symbols.local_constants.applicable_kinds = local +dotnet_naming_symbols.local_constants.applicable_accessibilities = local +dotnet_naming_symbols.local_constants.required_modifiers = const + +dotnet_naming_symbols.parameters.applicable_kinds = parameter +dotnet_naming_symbols.parameters.applicable_accessibilities = * +dotnet_naming_symbols.parameters.required_modifiers = + +dotnet_naming_symbols.public_constant_fields.applicable_kinds = field +dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_constant_fields.required_modifiers = const + +dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function +dotnet_naming_symbols.local_functions.applicable_accessibilities = * +dotnet_naming_symbols.local_functions.required_modifiers = + +# Naming styles + +dotnet_naming_style.pascalcase.required_prefix = +dotnet_naming_style.pascalcase.required_suffix = +dotnet_naming_style.pascalcase.word_separator = +dotnet_naming_style.pascalcase.capitalization = pascal_case + +dotnet_naming_style.ipascalcase.required_prefix = I +dotnet_naming_style.ipascalcase.required_suffix = +dotnet_naming_style.ipascalcase.word_separator = +dotnet_naming_style.ipascalcase.capitalization = pascal_case + +dotnet_naming_style.tpascalcase.required_prefix = T +dotnet_naming_style.tpascalcase.required_suffix = +dotnet_naming_style.tpascalcase.word_separator = +dotnet_naming_style.tpascalcase.capitalization = pascal_case + +dotnet_naming_style._camelcase.required_prefix = _ +dotnet_naming_style._camelcase.required_suffix = +dotnet_naming_style._camelcase.word_separator = +dotnet_naming_style._camelcase.capitalization = camel_case + +dotnet_naming_style.camelcase.required_prefix = +dotnet_naming_style.camelcase.required_suffix = +dotnet_naming_style.camelcase.word_separator = +dotnet_naming_style.camelcase.capitalization = camel_case + +dotnet_naming_style.s_camelcase.required_prefix = s_ +dotnet_naming_style.s_camelcase.required_suffix = +dotnet_naming_style.s_camelcase.word_separator = +dotnet_naming_style.s_camelcase.capitalization = camel_case + diff --git a/AzFuncContainer.sln b/AzFuncContainer.sln new file mode 100644 index 0000000..19a39ec --- /dev/null +++ b/AzFuncContainer.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionAppWithDockerfile", "FunctionAppWithDockerfile\FunctionAppWithDockerfile.csproj", "{1008F78D-7025-48EC-99F2-1CF9EFE27391}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionAppWithMSBuild", "FunctionAppWithMSBuild\FunctionAppWithMSBuild.csproj", "{D7251BD2-3B1F-470C-B14D-18C64ABA0189}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1008F78D-7025-48EC-99F2-1CF9EFE27391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1008F78D-7025-48EC-99F2-1CF9EFE27391}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1008F78D-7025-48EC-99F2-1CF9EFE27391}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1008F78D-7025-48EC-99F2-1CF9EFE27391}.Release|Any CPU.Build.0 = Release|Any CPU + {D7251BD2-3B1F-470C-B14D-18C64ABA0189}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7251BD2-3B1F-470C-B14D-18C64ABA0189}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7251BD2-3B1F-470C-B14D-18C64ABA0189}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7251BD2-3B1F-470C-B14D-18C64ABA0189}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..6653126 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,11 @@ + + + net8.0 + enable + enable + + v4 + Exe + + + diff --git a/FunctionAppWithDockerfile/.dockerignore b/FunctionAppWithDockerfile/.dockerignore new file mode 100644 index 0000000..1927772 --- /dev/null +++ b/FunctionAppWithDockerfile/.dockerignore @@ -0,0 +1 @@ +local.settings.json \ No newline at end of file diff --git a/FunctionAppWithDockerfile/.gitignore b/FunctionAppWithDockerfile/.gitignore new file mode 100644 index 0000000..ad9b6e1 --- /dev/null +++ b/FunctionAppWithDockerfile/.gitignore @@ -0,0 +1,264 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# Azure Functions localsettings file +# local.settings.json + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/FunctionAppWithDockerfile/.vscode/extensions.json b/FunctionAppWithDockerfile/.vscode/extensions.json new file mode 100644 index 0000000..036c408 --- /dev/null +++ b/FunctionAppWithDockerfile/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-azuretools.vscode-azurefunctions" + ] +} \ No newline at end of file diff --git a/FunctionAppWithDockerfile/Dockerfile b/FunctionAppWithDockerfile/Dockerfile new file mode 100644 index 0000000..f42447e --- /dev/null +++ b/FunctionAppWithDockerfile/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env + +COPY . /src/dotnet-function-app +RUN cd /src/dotnet-function-app && \ +mkdir -p /home/site/wwwroot && \ +dotnet publish *.csproj --output /home/site/wwwroot + +# To enable ssh & remote debugging on app service change the base image to the one below +# FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0-appservice +FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0 +ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ + AzureFunctionsJobHost__Logging__Console__IsEnabled=true + +COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"] \ No newline at end of file diff --git a/FunctionAppWithDockerfile/FunctionAppWithDockerfile.csproj b/FunctionAppWithDockerfile/FunctionAppWithDockerfile.csproj new file mode 100644 index 0000000..21c390d --- /dev/null +++ b/FunctionAppWithDockerfile/FunctionAppWithDockerfile.csproj @@ -0,0 +1,36 @@ + + + + net8.0 + v4 + Exe + + FunctionAppWithDockerfile + FunctionAppWithDockerfile + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + + + + + + \ No newline at end of file diff --git a/FunctionAppWithDockerfile/HttpExampleTrigger.cs b/FunctionAppWithDockerfile/HttpExampleTrigger.cs new file mode 100644 index 0000000..a23ca81 --- /dev/null +++ b/FunctionAppWithDockerfile/HttpExampleTrigger.cs @@ -0,0 +1,23 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.Functions.Worker; +using Microsoft.Extensions.Logging; + +namespace FunctionAppWithDockerfile; + +public class HttpExampleTrigger +{ + private readonly ILogger _logger; + + public HttpExampleTrigger(ILogger logger) + { + _logger = logger; + } + + [Function("HttpExampleTrigger")] + public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req) + { + _logger.LogInformation("C# HTTP trigger function processed a request."); + return new OkObjectResult("Welcome to Azure Functions with Dockerfile!"); + } +} diff --git a/FunctionAppWithDockerfile/Program.cs b/FunctionAppWithDockerfile/Program.cs new file mode 100644 index 0000000..9389455 --- /dev/null +++ b/FunctionAppWithDockerfile/Program.cs @@ -0,0 +1,13 @@ +using Microsoft.Azure.Functions.Worker; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; + +var host = new HostBuilder() + .ConfigureFunctionsWebApplication() + .ConfigureServices(services => { + services.AddApplicationInsightsTelemetryWorkerService(); + services.ConfigureFunctionsApplicationInsights(); + }) + .Build(); + +host.Run(); diff --git a/FunctionAppWithDockerfile/Properties/launchSettings.json b/FunctionAppWithDockerfile/Properties/launchSettings.json new file mode 100644 index 0000000..181ccc6 --- /dev/null +++ b/FunctionAppWithDockerfile/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "profiles": { + "FunctionAppWithDockerfile": { + "commandName": "Project", + "commandLineArgs": "--port 7111", + "launchBrowser": false + } + } +} \ No newline at end of file diff --git a/FunctionAppWithDockerfile/host.json b/FunctionAppWithDockerfile/host.json new file mode 100644 index 0000000..5df170b --- /dev/null +++ b/FunctionAppWithDockerfile/host.json @@ -0,0 +1,12 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + }, + "enableLiveMetricsFilters": true + } + } +} \ No newline at end of file diff --git a/FunctionAppWithDockerfile/local.settings.json b/FunctionAppWithDockerfile/local.settings.json new file mode 100644 index 0000000..aa72b19 --- /dev/null +++ b/FunctionAppWithDockerfile/local.settings.json @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated" + } +} \ No newline at end of file diff --git a/FunctionAppWithMSBuild/.gitignore b/FunctionAppWithMSBuild/.gitignore new file mode 100644 index 0000000..ad9b6e1 --- /dev/null +++ b/FunctionAppWithMSBuild/.gitignore @@ -0,0 +1,264 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# Azure Functions localsettings file +# local.settings.json + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/FunctionAppWithMSBuild/.vscode/extensions.json b/FunctionAppWithMSBuild/.vscode/extensions.json new file mode 100644 index 0000000..036c408 --- /dev/null +++ b/FunctionAppWithMSBuild/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-azuretools.vscode-azurefunctions" + ] +} \ No newline at end of file diff --git a/FunctionAppWithMSBuild/FunctionAppWithMSBuild.csproj b/FunctionAppWithMSBuild/FunctionAppWithMSBuild.csproj new file mode 100644 index 0000000..39272ce --- /dev/null +++ b/FunctionAppWithMSBuild/FunctionAppWithMSBuild.csproj @@ -0,0 +1,45 @@ + + + + net8.0 + v4 + Exe + + FunctionAppWithMSBuild + FunctionAppWithMSBuild + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + Never + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FunctionAppWithMSBuild/HttpExampleTrigger.cs b/FunctionAppWithMSBuild/HttpExampleTrigger.cs new file mode 100644 index 0000000..5294f8a --- /dev/null +++ b/FunctionAppWithMSBuild/HttpExampleTrigger.cs @@ -0,0 +1,23 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Azure.Functions.Worker; +using Microsoft.Extensions.Logging; + +namespace FunctionAppWithMSBuild; + +public class HttpExampleTrigger +{ + private readonly ILogger _logger; + + public HttpExampleTrigger(ILogger logger) + { + _logger = logger; + } + + [Function("HttpExampleTrigger")] + public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req) + { + _logger.LogInformation("C# HTTP trigger function processed a request."); + return new OkObjectResult("Welcome to Azure Functions with MSBuild!"); + } +} diff --git a/FunctionAppWithMSBuild/Program.cs b/FunctionAppWithMSBuild/Program.cs new file mode 100644 index 0000000..9389455 --- /dev/null +++ b/FunctionAppWithMSBuild/Program.cs @@ -0,0 +1,13 @@ +using Microsoft.Azure.Functions.Worker; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; + +var host = new HostBuilder() + .ConfigureFunctionsWebApplication() + .ConfigureServices(services => { + services.AddApplicationInsightsTelemetryWorkerService(); + services.ConfigureFunctionsApplicationInsights(); + }) + .Build(); + +host.Run(); diff --git a/FunctionAppWithMSBuild/Properties/launchSettings.json b/FunctionAppWithMSBuild/Properties/launchSettings.json new file mode 100644 index 0000000..f918f26 --- /dev/null +++ b/FunctionAppWithMSBuild/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "profiles": { + "FunctionAppWithMSBuild": { + "commandName": "Project", + "commandLineArgs": "--port 7109", + "launchBrowser": false + } + } +} \ No newline at end of file diff --git a/FunctionAppWithMSBuild/host.json b/FunctionAppWithMSBuild/host.json new file mode 100644 index 0000000..5df170b --- /dev/null +++ b/FunctionAppWithMSBuild/host.json @@ -0,0 +1,12 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + }, + "enableLiveMetricsFilters": true + } + } +} \ No newline at end of file diff --git a/FunctionAppWithMSBuild/local.settings.json b/FunctionAppWithMSBuild/local.settings.json new file mode 100644 index 0000000..aa72b19 --- /dev/null +++ b/FunctionAppWithMSBuild/local.settings.json @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "UseDevelopmentStorage=true", + "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated" + } +} \ No newline at end of file diff --git a/README.md b/README.md index 7ece88e..744d3d7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,136 @@ -# msbuild-for-functions -This provides sample .NET function apps using container images with Dockerfile and with MSBuild on Docker Desktop. +# MSBuild for Azure Functions on Containers + +As a .NET developer, when you build a container image for your Azure Functions app, you can use the `Dockerfile` to define the container image. However, you can also use the `dotnet publish` command to build and publish the container image without a `Dockerfile`. This repository provides sample .NET function apps using container images with `Dockerfile` and with `dotnet publish`. + +## Prerequisites + +- [.NET SDK 8.0+](https://dotnet.microsoft.com/download/dotnet/8.0?WT.mc_id=dotnet-144884-juyoo) with [.NET Aspire workload](https://learn.microsoft.com/dotnet/aspire/fundamentals/setup-tooling?WT.mc_id=dotnet-144884-juyoo) +- [Visual Studio](https://visualstudio.microsoft.com/?WT.mc_id=dotnet-144884-juyoo) or [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=dotnet-144884-juyoo) + [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) + [Azure Functions](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions?WT.mc_id=dotnet-144884-juyoo) +- [Azure Functions Core Tools](https://learn.microsoft.com/azure/azure-functions/functions-run-local?WT.mc_id=dotnet-144884-juyoo) +- [Docker Desktop](https://www.docker.com/products/docker-desktop) + +## Getting Started + +> **NOTE**: Make sure Docker Desktop is running before you start. + +### Run with `Dockerfile` + +1. Run `func init` to create a new Azure Functions app with Docker support. + + ```bash + func init FunctionAppWithDockerfile --worker-runtime dotnet-isolated --docker --target-framework net8.0 + ``` + +1. Confirm the `Dockerfile` is created in the `FunctionAppWithDockerfile` folder. +1. Run `func new` to add a new HTTP trigger function. + + ```bash + pushd ./FunctionAppWithDockerfile + func new -n HttpExampleTrigger -t HttpTrigger --a anonymous + ``` + +1. Open `HttpExampleTrigger.cs` and modify the line. + + ```csharp + // Before + return new OkObjectResult("Welcome to Azure Functions!"); + + // After + return new OkObjectResult("Welcome to Azure Functions with Dockerfile!"); + ``` + +1. Run `docker build` to build the container image. + + ```bash + docker build . -t funcapp:latest-dockerfile + ``` + +1. Return to the repository root. + + ```bash + popd + ``` + +1. Run the function app container. + + ```bash + docker run -d -p 7071:80 --name funcappdockerfile funcapp:latest-dockerfile + ``` + +1. Open the browser and navigate to `http://localhost:7071/api/HttpExampleTrigger` to see the function app running. +1. Run the following command to stop and remove the container. + + ```bash + docker stop funcappdockerfile + docker rm funcappdockerfile + ``` + +### Run with `dotnet publish` + +1. Run `func init` to create a new Azure Functions app without Docker support. + + ```bash + func init FunctionAppWithMSBuild --worker-runtime dotnet-isolated --target-framework net8.0 + ``` + +1. Run `func new` to add a new HTTP trigger function. + + ```bash + pushd ./FunctionAppWithMSBuild + func new -n HttpExampleTrigger -t HttpTrigger --a anonymous + ``` + +1. Open `HttpExampleTrigger.cs` and modify the line. + + ```csharp + // Before + return new OkObjectResult("Welcome to Azure Functions!"); + + // After + return new OkObjectResult("Welcome to Azure Functions with MSBuild!"); + ``` + +1. Open `FunctionAppWithMSBuild.csproj` and add the following item group nodes. + + ```xml + + + + + + + + + ``` + +1. Return to the repository root. + + ```bash + popd + ``` + +1. Run the following `dotnet publish` command to build and publish the function app. + + ```bash + dotnet publish ./FunctionAppWithMSBuild ` + -t:PublishContainer ` + --os linux --arch x64 ` + -p:ContainerBaseImage=mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0 ` + -p:ContainerRepository=funcapp ` + -p:ContainerImageTag=latest-msbuild ` + -p:ContainerWorkingDirectory="/home/site/wwwroot" + ``` + +1. Run the function app container. + + ```bash + docker run -d -p 7071:80 --name funcappmsbuild funcapp:latest-msbuild + ``` + +1. Open the browser and navigate to `http://localhost:7071/api/HttpExampleTrigger` to see the function app running. +1. Run the following command to stop and remove the container. + + ```bash + docker stop funcappmsbuild + docker rm funcappmsbuild + ``` diff --git a/global.json b/global.json new file mode 100644 index 0000000..a8ab760 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "allowPrerelease": false + } +} \ No newline at end of file