Skip to content

Commit d92a515

Browse files
authored
set NLS_LANG for oracle (#21)
1 parent 0a1fdd3 commit d92a515

4 files changed

Lines changed: 24 additions & 2 deletions

File tree

mt/common.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ services:
3737
restart: always
3838
entrypoint: "/usr/local/bin/docker-entrypoint.sh"
3939
environment:
40+
NLS_LANG: ${NLS_LANG:-Japanese_Japan.UTF8}
4041
APACHE_LOG_DIR: ${APACHE_LOG_DIR:-/tmp/apache2/log}
4142
APACHE_PID_FILE: ${APACHE_PID_FILE:-/tmp/apache2/run/apache2.pid}
4243
volumes:

mt/httpd/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ ARG DOCKER_HTTPD_IMAGE
22
FROM ${DOCKER_HTTPD_IMAGE}
33

44
COPY build-script/*.sh /tmp/build-script/
5-
RUN /bin/bash /tmp/build-script/apache2.sh \
5+
RUN for f in /tmp/build-script/*.sh; do \
6+
/bin/bash $f; \
7+
done \
68
&& rm -rf /tmp/build-script

mt/httpd/build-script/apache2.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/sh -x
22

33
conf_dirs="/etc/httpd/conf.d /etc/apache2/conf-enabled /etc/httpd/conf/extra"
44
module_dirs="/usr/lib/apache2/modules /usr/lib64/httpd/modules /usr/lib/httpd/modules"
@@ -57,3 +57,11 @@ if [ $httpd_conf_d = "/etc/httpd/conf/extra" ]; then
5757
Include conf/extra/mt*.conf
5858
CONF
5959
fi
60+
61+
mod_env_so=`find $module_dirs -name 'mod_env.so' 2>/dev/null | head -1`
62+
if [ -n "$mod_env_so" ]; then
63+
cat > $httpd_conf_d/mt-env.conf <<CONF
64+
LoadModule env_module $mod_env_so
65+
PassEnv NLS_LANG
66+
CONF
67+
fi

mt/httpd/build-script/php.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh -x
2+
3+
php_fpm_dirs="/etc/php-fpm.d"
4+
php_fpm_d=`ls -d $php_fpm_dirs 2>/dev/null | head -1`
5+
6+
if [ -n "$php_fpm_d" ]; then
7+
cat > /etc/php-fpm.d/mt-env.conf <<CONF
8+
[www]
9+
env[NLS_LANG] = \$NLS_LANG
10+
CONF
11+
fi

0 commit comments

Comments
 (0)