ubuntu 20.04套餐丢失了码头图像中的所有mo files
由于某种原因,ISO-编码软件包不会在Docker Image中安装其文件。
这是考虑到或多或少的最小码头框的考虑:
FROM ubuntu:20.04
ENV TZ=Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
RUN apt-get update && apt-get install -y iso-codes
RUN ls /usr
如果这些设置相关,我已经离开了与语言环境相关的设置。当我从和运行apt-get update& amp;&&时,出现同样的问题。 apt-get install -y iso-codes
out。
建筑物:
docker build -t 'mytry:1' .
现在运行以下内容时,我在Mo -Files应该居住的目录中看不到任何内容:
docker run --cidfile /tmp/docker_test.cid 'mytry:1' ls -R /usr/share/locale/en/LC_MESSAGES/
但是,dpkg -l </code>显示它在那里:
ii iso-codes 4.4-1 all ISO language, territory, currency, script codes and their translations
和dpkg -l </code >目录中有一些文件:
/usr/share/locale/en/LC_MESSAGES
/usr/share/locale/en/LC_MESSAGES/iso_3166-2.mo
/usr/share/locale/en/LC_MESSAGES/iso_3166_2.mo
我缺少什么? 使用特定的docker运行方式。
(我正在 此类文件在任何地方。
同样,似乎也应该有MO文件的Poedit-Common缺少它们,因此问题更为笼统。
Docker -V
给出
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2
For some reason, iso-codes package does not install it's files inside docker image.
Here is what as consider more or less minimal Dockerfile:
FROM ubuntu:20.04
ENV TZ=Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
RUN apt-get update && apt-get install -y iso-codes
RUN ls /usr
I have left locale-related settings in case those are relevant. The same problem appears when I comment all but FROM
and RUN apt-get update && apt-get install -y iso-codes
out.
Building:
docker build -t 'mytry:1' .
Now when I run the following, I do not see anything in the directory where mo-files should reside:
docker run --cidfile /tmp/docker_test.cid 'mytry:1' ls -R /usr/share/locale/en/LC_MESSAGES/
However, dpkg -l
shows it's there:
ii iso-codes 4.4-1 all ISO language, territory, currency, script codes and their translations
And dpkg -L
has some files in the directory:
/usr/share/locale/en/LC_MESSAGES
/usr/share/locale/en/LC_MESSAGES/iso_3166-2.mo
/usr/share/locale/en/LC_MESSAGES/iso_3166_2.mo
What is that I am missing? (I am using the specific docker run way just for simplicity. The same problem arises in the normal usage)
I also tried find / -name 'iso_3166-1.mo'
, but seems like there is no such file anywhere.
Also it seems like poedit-common, which also should have mo files, is missing them, so the problem is more general.
docker -v
gives
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们找到了一个原因:
为了获取语言环境,应该评论
path-exclude
为/usr/usr/share/share/locale/... >或替换文件。安装软件包之前。
当然,图像的大小会因此而增长。
We have found the reason:
In order to get locales, one should comment out the
path-exclude
line for/usr/share/locale/...
or replace the file. Before installing packages.Of course, the size of the image can grow as a result.