Windows容器-文化设置 [英] Windows Containers - culture settings

查看:83
本文介绍了Windows容器-文化设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在计算机上运行旧版应用程序,这需要Windows中的特定区域性设置才能正常运行。我不想在Windows中更改全局区域性设置以适应此应用程序

I need to run a legacy application on my computer, which requires a specific culture setting in Windows in order to work. I do not want to change the global culture settings in Windows in order to accommodate this application

我可以在虚拟机中运行它,但我更希望在虚拟机中运行它

I could run it in a Virtual Machine, but I would prefer to run it in a Docker Windows Container instead, if possible.

是否可以为在Docker Windows容器中运行的应用程序配置特定的区域性?如何实现?

Is it possible to configure a specific culture for an application running in a Docker Windows Container, and how is this done?

推荐答案

此问题有一个有效的窍门:

There is a working trick for this problem:

docker run --name temp-container --user "NT AUTHORITY\SYSTEM" --isolation=process your-image:your-tag powershell Set-Culture en-AU

docker commit temp-container your-image:your-tag
docker rm temp-container

现在您可以开始图像了:

Now you can start your image:

docker run --rm -it --isolation=process your-image:your-tag powershell

您将拥有文化'en-AU'

And you will have culture 'en-AU'

这篇关于Windows容器-文化设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆