You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to run the Azure Functions Core Tools inside VSCode Remote Container. As a base image I use ubuntu:20.04, the full dockerfile specification you can find in my repository cloud_templates.
The problem
The container build process passes without any issue, but when I try to run any func command inside I'm getting the following error:
root@fda466bd6be3:/workspaces/cloud_templates/src/az_func# func --help
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.Globalization.CultureInfo.get_InvariantCulture()
at Newtonsoft.Json.JsonSerializerSettings..cctor()
at Newtonsoft.Json.JsonSerializer..ctor()
at Newtonsoft.Json.JsonSerializer.Create()
at Newtonsoft.Json.JsonSerializer.Create(Newtonsoft.Json.JsonSerializerSettings)
at Newtonsoft.Json.JsonSerializer.CreateDefault()
at Newtonsoft.Json.JsonSerializer.CreateDefault(Newtonsoft.Json.JsonSerializerSettings)
at Newtonsoft.Json.JsonConvert.DeserializeObject(System.String, System.Type, Newtonsoft.Json.JsonSerializerSettings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String, Newtonsoft.Json.JsonSerializerSettings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String)
at Azure.Functions.Cli.Common.AppSettingsFile..ctor(System.String)
at Azure.Functions.Cli.Common.SecretsManager.GetSecrets()
at Azure.Functions.Cli.Helpers.WorkerRuntimeLanguageHelper.GetCurrentWorkerRuntimeLanguage(Azure.Functions.Cli.Interfaces.ISecretsManager)
at Azure.Functions.Cli.Helpers.GlobalCoreToolsSettings.Init(Azure.Functions.Cli.Interfaces.ISecretsManager, System.String[])
at Azure.Functions.Cli.ConsoleApp..ctor(System.String[], System.Reflection.Assembly, Autofac.IContainer)
at Azure.Functions.Cli.ConsoleApp+<RunAsync>d__7`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Functions.Cli.ConsoleApp+<RunAsync>d__7`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], func, Version=3.0.3442.0, Culture=neutral, PublicKeyToken=null]](<RunAsync>d__7`1<System.__Canon> ByRef)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Azure.Functions.Cli.ConsoleApp+<RunAsync>d__7`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], func, Version=3.0.3442.0, Culture=neutral, PublicKeyToken=null]](<RunAsync>d__7`1<System.__Canon> ByRef)
at Azure.Functions.Cli.ConsoleApp.RunAsync[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String[], Autofac.IContainer)
at Azure.Functions.Cli.ConsoleApp+<>c__DisplayClass6_0`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<Run>b__0()
at System.Threading.Tasks.Task`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InnerInvoke()
at System.Threading.Tasks.Task+<>c.<.cctor>b__274_0(System.Object)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(System.Threading.Thread)
at System.Threading.Tasks.Task.ExecuteFromThreadPool(System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Aborted
The same installation process on my WSL2 Ubuntu-20.04 works without problems.
My colleague helped me to find this thread dotnet/core#2186, which suggest disabling globalization via the environment variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true. With this env-var, everything works in a container too.
I've already pushed the change-set to the repo.
Is it a known issue? Does it make sense to update the function-core-tools installation page to mention it?
@apawast, the referenced page is about old version of rhel and centos, while I try to run the tool on latest ubuntu image. At least, in my case, it was not obvious that I have to fix my func-core-tools ubuntu installation based on dotnet-app troubleshooting for centos/rhel.
a blanket statement does not seem appropriate here
I'm saying that func does not work on docker image ubuntu:20.04 and I give exact dockerfile to reproduce the issue with two terminal commands. Why is it inappropriate?
It's up to you how to maintain the documentation for your project. I wanted to offer help and spent my time describing the problem.
ghost
locked as resolved and limited conversation to collaborators
May 22, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The context
I try to run the Azure Functions Core Tools inside VSCode Remote Container. As a base image I use
ubuntu:20.04
, the full dockerfile specification you can find in my repository cloud_templates.The problem
The container build process passes without any issue, but when I try to run any
func
command inside I'm getting the following error:The same installation process on my WSL2 Ubuntu-20.04 works without problems.
Steps to reproduce
In VSCode Remote Container
Clone the repository https://github.com/v1r7u/cloud_templates and open it in VSCode Remote Container
In Docker Image
docker build -t cloud-templates:test -f .devcontainer/Dockerfile .
docker run -it --rm cloud-templates:test func --help
Do you have any ideas about what could be wrong?
The text was updated successfully, but these errors were encountered: