Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laradock
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kerwin
laradock
Commits
1286b7ef
Commit
1286b7ef
authored
Feb 14, 2019
by
Ion Jaureguialzo Sarasola
Committed by
Shao Yu-Lung (Allen)
Feb 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for additional locales in PHP-FPM (#1976)
parent
e0d7229e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
0 deletions
+33
-0
index.md
DOCUMENTATION/content/documentation/index.md
+13
-0
docker-compose.yml
docker-compose.yml
+2
-0
env-example
env-example
+2
-0
Dockerfile
php-fpm/Dockerfile
+16
-0
No files found.
DOCUMENTATION/content/documentation/index.md
View file @
1286b7ef
...
...
@@ -1300,6 +1300,19 @@ We also recommend [setting the timezone in Laravel](http://www.camroncade.com/ma
<br>
<a name="Add locales to PHP-FPM"></a>
## Add locales to PHP-FPM
To add locales to the container:
1 - Open the `
.env
` file and set `
PHP_FPM_INSTALL_ADDITIONAL_LOCALES
` to `
true
`.
2 - Add locale codes to `
PHP_FPM_ADDITIONAL_LOCALES
`.
3 - Re-build your PHP-FPM Container `
docker-compose build php-fpm
`.
4 - Check enabled locales with `
docker-compose exec php-fpm locale -a
`
...
...
docker-compose.yml
View file @
1286b7ef
...
...
@@ -162,6 +162,8 @@ services:
-
INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
-
INSTALL_APCU=${PHP_FPM_INSTALL_APCU}
-
INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
-
INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}
-
ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
volumes
:
-
./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
-
${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
...
...
env-example
View file @
1286b7ef
...
...
@@ -169,6 +169,8 @@ PHP_FPM_INSTALL_IONCUBE=false
PHP_FPM_FAKETIME=-0
PHP_FPM_INSTALL_APCU=false
PHP_FPM_INSTALL_YAML=false
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"
### PHP_WORKER ############################################
...
...
php-fpm/Dockerfile
View file @
1286b7ef
...
...
@@ -585,6 +585,22 @@ RUN if [ ${INSTALL_YAML} = true ]; then \
docker-php-ext-enable yaml
\
;
fi
###########################################################################
# Install additional locales:
###########################################################################
ARG
INSTALL_ADDITIONAL_LOCALES=false
ARG
ADDITIONAL_LOCALES
RUN if
[
${
INSTALL_ADDITIONAL_LOCALES
}
=
true
]
;
then
\
apt-get
install
-y
locales
\
&&
echo
''
>>
/usr/share/locale/locale.alias
\
&&
temp
=
"
${
ADDITIONAL_LOCALES
%\
"}"
\
&& temp=
"
${
temp
#\
"}"
\
&& for i in
${
temp
}
; do sed -i
"/
$i
/s/^#//g"
/etc/locale.gen; done
\
&& locale-gen
\
;fi
###########################################################################
# Check PHP version:
###########################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment