Copy Debian's "Locales" section for Ubuntu (with very minor changes)
This commit is contained in:
parent
d4e2911219
commit
24b2acbbe6
|
|
@ -16,6 +16,18 @@ The `ubuntu:latest` tag points to the "latest LTS", since that's the version rec
|
|||
|
||||
Along a similar vein, the `ubuntu:devel` tag is an alias for whichever release the "devel" suite on the mirrors currently points to, as determined by the following one-liner: `wget -qO- http://archive.ubuntu.com/ubuntu/dists/devel/Release | awk -F ': ' '$1 == "Codename" { print $2; exit }'`
|
||||
|
||||
## Locales
|
||||
|
||||
Given that it is a minimal install of Ubuntu, this image only includes the `C`, `C.UTF-8`, and `POSIX` locales by default. For most uses requiring a UTF-8 locale, `C.UTF-8` is likely sufficient (`-e LANG=C.UTF-8` or `ENV LANG C.UTF-8`).
|
||||
|
||||
For uses where that is not sufficient, other locales can be installed/generated via the `locales` package. [PostgreSQL has a good example of doing so](https://github.com/docker-library/postgres/blob/69bc540ecfffecce72d49fa7e4a46680350037f9/9.6/Dockerfile#L21-L24), copied below:
|
||||
|
||||
```dockerfile
|
||||
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
|
||||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
ENV LANG en_US.utf8
|
||||
```
|
||||
|
||||
## `/etc/apt/sources.list`
|
||||
|
||||
### `ubuntu:16.04`
|
||||
|
|
|
|||
Loading…
Reference in New Issue