LoginSignup
1
0

More than 5 years have passed since last update.

CircleCIで"Container ID xxxxxx cannot be mapped to a host ID"なエラーが出た場合、Dockerイメージ側でtarコマンドを使っていないか確認すると問題が解決するかも

Last updated at Posted at 2017-09-12
  1. CircleCIでDockerのホストマシンとコンテナのUID/GIDのマッピングにはマッピング可能な範囲がある。マッピング可能な範囲外のUID/GIDがDockerイメージ内にあるとContainer ID xxxxxx cannot be mapped to a host IDなエラーになる ( 参考URL: Debugging Container ID Cannot Be Mapped to Host ID Error )
  2. ところで、Dockerイメージを作るときは(大抵普段は使わない)rootでの操作をすることが多い。
  3. rootでtarコマンドで解凍するとパーミッションだけでなくUID/GIDも保持される ( 参考URL: superuser権限でtarコマンドで解凍すると何も考えなくてもパーミッションと所有者が保持される )
  4. どこかから取得したtarballをrootで解凍してたりすると想定外のUID/GIDが。。。

私はgitを本家のtarballからインストールする処理を書いていてエラーになりました。

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