2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Dockerのdebianでfastlaneを使おうとしたらbash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Posted at

Debianのコンテナでfastlaneを使おうとして、LC_ALLとLANGをen_US.UTF-8に設定したのだが、 bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) というwarningが表示されていて気持ち悪かった。
fastlane自体は問題なく動いているようだが、不安なのでwarningを消すための方法を調べました。

以下のようなDockerfileにすればwarningは表示されなくなりました。

RUN apt-get install -y ruby ruby-dev gcc g++ make locales
RUN gem install fastlane -NV
RUN locale-gen en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN localedef -f UTF-8 -i en_US en_US.UTF-8
ENV RUBYOPT -EUTF-8

LC_ALLとLANGの設定はfastlaneのドキュメントから。
locale-genとlocaledefの行はこちらを参考にしました。

2
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?