无法在Docker镜像中配置区域设置

时间:2015-09-01 14:00:28

标签: ubuntu docker locale ubuntu-14.04 dockerfile

我正在尝试在Docker镜像中安装区域设置文件,但由于某种原因它无法正确安装。

我的Dockerfile中的这些行会配置+安装区域设置文件:

# Install and configure locales
RUN ["apt-get", "install", "-y", "locales"]
RUN ["locale-gen", "nl_NL.UTF-8"]
RUN ["dpkg-reconfigure", "locales"]
RUN ["update-locale"]
ENV LANG nl_NL.UTF-8

图像是成功创建的。当我运行docker exec **ID** locale -a时,我仍然会收到以下错误:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX

所以我猜它没有正确安装语言环境文件。任何人都可以帮我这个吗?

1 个答案:

答案 0 :(得分:2)

同时尝试 FileFilter wildcardFileFilter = new WildcardFileFilter("*.yml"); FileFilter isFileFileFilter = FileFileFilter.FILE; File[] listFiles = dir.listFiles(???); locales

喜欢:

locales-all