Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1518563 - system locale is not configurable without re-build image
Summary: system locale is not configurable without re-build image
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Docker
Version: 6.4.20
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: jboss-set
QA Contact: Michal Karm Babacek
eap-docs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-29 08:26 UTC by Kenjiro Nakayama
Modified: 2017-12-06 05:52 UTC (History)
12 users (show)

Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-06 05:52:22 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3256651 None None None 2017-12-01 00:34:52 UTC

Description Kenjiro Nakayama 2017-11-29 08:26:49 UTC
Description of problem:

- Currently Red Hat's provided all base image for s2i does not allow users to configure system locale without re-build. Due to this, for example, EAP image cannot change the language, even though JBoss EAP has a localization.

Version-Release number of selected component (if applicable):
- OCP 3.x

How reproducible: 100%

Steps to Reproduce:

1. Run eap base image

 # docker run -it --rm registry.access.redhat.com/jboss-eap-7/eap70-openshift /bin/bash

2. Try to set language

  # echo 'JAVA_OPTS="$JAVA_OPTS -Duser.language=ja -Duser.country=JP"' >> /opt/eap/bin/standalone.conf

3. Run eap

  # /opt/eap/bin/standalone.sh
  
Actual results:
- Log message does not show correctly.

(e.g)
  08:20:00,421 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.0.8.GA (WildFly Core 2.1.18.Final-redhat-1) ? 9446ms ??????? -  ???? 598 ???? 306 ???????? (380 ???????????????????????????)?

Expected results:
- Log should display corectly.

(e.g)
  08:21:40,950 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.0.8.GA (WildFly Core 2.1.18.Final-redhat-1) は 10043ms で開始しました -  サービス 598 個のうち 306 個を開始しました (380 のサービスはレイジー、パッシブ、またはオンデマンドです)。

Additional info:
- If we create following Dockerfile (localedef + ENV setting), it is possible to change the locale. So, we would like to execute `localedef -f UTF-8 -i ja_JP ja_JP.UTF-8` during building the image somehow.

Dockerfile
~~~
FROM registry.access.redhat.com/jboss-eap-7/eap70-openshift

USER root
RUN localedef -f UTF-8 -i ja_JP ja_JP.UTF-8
USER jboss
~~~

docker build -t test .
docker run -it --rm test /bin/bash
[jboss@b2111a055d3d ~]$ LANG=ja_JP.UTF-8 /opt/eap/bin/standalone.sh

Comment 1 Kenjiro Nakayama 2017-12-05 07:59:46 UTC
Sorry, it was possible to output Japanese log on EAP image by setting -Dfile.encoding=UTF8 like:

  # oc env dc <YOUR_DC_NAME> JAVA_OPTS_APPEND="-Duser.language=ja -Duser.country=JP -Dfile.encoding=UTF8"

Comment 2 Ben Parees 2017-12-05 13:34:13 UTC
So this can be closed? If so, please do so.

Comment 3 Kenjiro Nakayama 2017-12-06 05:52:22 UTC
Yes, there may be some situation which needs localedef, but currently we don't get any request about it. So, I am closing this ticket now.


Note You need to log in before you can comment on or make changes to this bug.