Locale nl_NL missing in docker BitBucket pipeline


Locale nl_NL missing in docker BitBucket pipeline



I'm using this bitbucket-pipelines.yml file to test my application before deploying it on the servers. We're missing the nl_NL locale after installing the dependencies. We're using the following file:


bitbucket-pipelines.yml



bitbucket-pipelines.yml:


image: php:7.2.6

pipelines:
default:
- step:
name: PHPUnit
caches:
- composer
script:
- apt-get update && apt-get install -y unzip git zlib1g-dev libicu-dev g++ locales
- locale-gen && locale-gen nl_NL
- echo "nl_NL UTF-8" >> /etc/locale.gen && echo "en_EN UTF-8" >> /etc/locale.gen && echo "enUS UTF-8" >> /etc/locale.gen && echo "en_GB UTF-8" >> /etc/locale.gen
- locale -a



The locale -a output after installation is as following:


locale -a
<1s
+ locale -a
C
C.UTF-8
POSIX



I did expect the nl_NL locale in this command. This will result in failing tests. How can I fix this error?




1 Answer
1



You need to change the order of your commands. First, add nl_NL UTF-8 (and anything else you need) to /etc/locale.gen and only then run locale-gen.


nl_NL UTF-8


/etc/locale.gen


locale-gen





Thanks... So easy :)
– Petervw
Jul 2 at 11:45






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to make file upload 'Required' in Contact Form 7?

Rothschild family

amazon EC2 - How to make wp-config.php to writable?