7
7

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 3 years have passed since last update.

【メモ】Docker 環境構築時にキーボードレイアウトを聞かれないようにする方法

Posted at
  • 製造業出身のデータサイエンティストがお送りする記事
  • 今回はメモとして、Docker 環境構築時にキーボードレイアウトを聞かれないようにする方法を整理しました。

はじめに

docker で環境を構築している際に、The layout of keyboards varies per country, with some countries having multiple common layouts. Please select the country of origin for the keyboard of this computer. と聞かれて上手く環境構築ができない事が発生しました。

上記を解決するのに少し苦労したので、今回は対応した方法をメモとして残しておきます。

ちなみに下記のような結果が出ます。

The layout of keyboards varies per country, with some countries having multiple
common layouts. Please select the country of Origin for the keyboard of this
computer.

  1. Afghani                                     48. Iraqi
  2. Albanian                                    49. Irish
  3. Amharic                                     50. Italian
  4. Arabic                                      51. Japanese
  5. Arabic (Morocco)                            52. Japanese (PC-98xx Series)
  6. Arabic (Syria)                              53. Kazakh
  7. Armenian                                    54. Khmer (Cambodia)
  8. Azerbaijani                                 55. Korean
  9. Bambara                                     56. Kyrgyz
  10. Bangla                                     57. Lao
  11. Belarusian                                 58. Latvian
  12. Belgian                                    59. Lithuanian
  13. Bosnian                                    60. Macedonian
  14. Braille                                    61. Maltese
  15. Bulgarian                                  62. Maori
  16. Burmese                                    63. Moldavian
  17. Chinese                                    64. Mongolian
  18. Croatian                                   65. Montenegrin
  19. Czech                                      66. Nepali
  20. Danish                                     67. Norwegian
  21. Dhivehi                                    68. Persian
  22. Dutch                                      69. Polish
  23. Dzongkha                                   70. Portuguese
  24. English (Cameroon)                         71. Portuguese (Brazil)
  25. English (Ghana)                            72. Romanian
  26. English (Nigeria)                          73. Russian
  27. English (South Africa)                     74. Serbian
  28. English (UK)                               75. Sinhala (phonetic)
  29. English (US)                               76. Slovak
  30. Esperanto                                  77. Slovenian
  31. Estonian                                   78. Spanish
  32. Faroese                                    79. Spanish (Latin American)
  33. Filipino                                   80. Swahili (Kenya)
  34. Finnish                                    81. Swahili (Tanzania)
  35. French                                     82. Swedish
  36. French (Canada)                            83. Switzerland
  37. French (Democratic Republic of the Congo)  84. Taiwanese
  38. French (Guinea)                            85. Tajik
  39. French (Togo)                              86. Thai
  40. Georgian                                   87. Tswana
  41. German                                     88. Turkish
  42. German (Austria)                           89. Turkmen
  43. Greek                                      90. Ukrainian
  44. Hebrew                                     91. Urdu (Pakistan)
  45. Hungarian                                  92. Uzbek
  46. Icelandic                                  93. Vietnamese
  47. Indian                                     94. Wolof

回避方法

回避方法は簡単で下記2点を対策すると良いです。

  • 環境変数に DEBIAN_FRONTEND=noninteractive を設定
  • apt-getで --force-confdef--force-confold を設定

下記に Dockerfile のサンプルを記載しておきます。

FROM ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update &&
    apt-get install -y  -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" keyboard-configuration

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?