# How can I set up default language in Dockerfile?

**URL:** <https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker\
**Created:** [March 18, 2020, 2:49pm UTC](https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312 "2020-03-18T14:49:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![math\_u](https://help.nextcloud.com/user_avatar/help.nextcloud.com/math_u/32/21966_2.png) [@math\_u](https://help.nextcloud.com/u/math_u)\
**Post date:** [March 18, 2020, 2:49pm UTC](https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312/1 "2020-03-18T14:49:47Z")

</div>

Now I’m using Nextcloud(ver. 16.0.1) on Docker.  
I know I can set up `default language` via `config.php` and I’ ve already added `default_language => "en"` to it.  
But, I wanna add the configration automatically in `docker build` process.  
How can I achieve this ?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [March 18, 2020, 5:12pm UTC](https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312/2 "2020-03-18T17:12:58Z")

</div>

> [@math\_u](#):
>
> I’ ve already added `default_language => "en"` to it.

how did you do that?

> [@math\_u](#):
>
> I wanna add the configration automatically in `docker build` process

nextcloud is installed during the run of the entrypoint.sh skript. So if you really want to do this during `docker build` you have to clone nextcloud/docker from github and insert before line 139 in the following skript a task to insert `default_language => "en"` into config.php. I don’t know if there is a occ command for this.

> <https://github.com/nextcloud/docker/blob/430ce875c237bfe3759c0547669d3bbebedd7310/18.0/apache/entrypoint.sh#L139>

nevertheless that has a lot of disadvantages. you have to repeat this procedure with each update of nextcloud.

> [@math\_u](#):
>
> How can I achieve this ?

why you don’t simply map a directory from your host to `/var/www/html/config` into the container and edit the file on your host.

---

<div class="post-metadata">

**Author:** ![math\_u](https://help.nextcloud.com/user_avatar/help.nextcloud.com/math_u/32/21966_2.png) [@math\_u](https://help.nextcloud.com/u/math_u)\
**Post date:** [April 7, 2020, 6:03am UTC](https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312/3 "2020-04-07T06:03:16Z")

</div>

I’m sorry to be late for replying your kind help.

> how did you do that?  
> I ran following command on my nextcloud container.

```auto
# su -p www-data -s /bin/sh -c "/var/www/html/occ config:system:set default_language --value="ja""

```

> if you really want to do this during `docker build` you have to clone nextcloud/docker from github and insert before line 139 in the following skript a task to insert `default_language => "en"` into config.php.

OK. I’ll try this later. Thanks.

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [April 7, 2020, 7:21am UTC](https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312/4 "2020-04-07T07:21:19Z")

</div>

you may also look at [https://hub.docker.com/\_/nextcloud](https://hub.docker.com/_/nextcloud) chapter " Adding Features".

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 9:12pm UTC](https://help.nextcloud.com/t/how-can-i-set-up-default-language-in-dockerfile/74312/5 "2024-12-11T21:12:03Z")

</div>


