当我构建映像并从容器检查locale
时
mvn spring-boot:build-image
docker run myimage
docker exec -it <id> locale
我得到了
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
我的应用程序在处理非ASCII字符串时失败
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: ...
at java.base/sun.nio.fs.UnixPath.encode(Unknown Source)
at java.base/sun.nio.fs.UnixPath.(Unknown Source)
at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source)
at java.base/java.nio.file.Path.resolve(Unknown Source)
UTF-8字符集修复错误
docker run -e LANG=C.UTF-8 myimage
我想把LANG env默认值添加到图像中。我该怎么做?
1条答案
按热度按时间dm7nw8vv1#
配置
修复了
docker exec -it <id> locale
显示POSIX
的问题。这是我的建议,我对你感激不尽!