LoginSignup
2
0

More than 1 year has passed since last update.

Docker コンテナの日本語化

Last updated at Posted at 2022-11-16

Moodle の bitnami Docker コンテナを立ち上げたのですが、英語のままなので、日本語化してみました。

$ cd <docker-compose.ymlのあるディレクトリ>
$ docker containter exec -it  <container-name> /bin/bash

root@<container-id>:/# sed -i -E 's/# (ja_JP.UTF-8)/\1/' /etc/locale.gen
root@<container-id>:/# cat /etc/locale.gen | grep ja_JP
root@<container-id>:/# apt-get update && apt-get install -y locales && locale-gen ja_JP.UTF-8 && echo "export LANG=ja_JP.UTF-8" >> ~/.bashrc
root@<container-id>:/# exit
$ docker compose restart

コンテナ内で日本語が使えるようになりました。
あとは、Moodle に入って、言語パックをインストールするだけです。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0