0
0

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.

[CircleCI] ローカルディレクトリをコンテナ上にマウントして実行

Posted at
$ circleci build -v ローカルディレクトリのパス:コンテナ上のディレクトリのパス
$ # 例 => circleci build -v ~/.ssh:/root/ssh

ローカル環境でCircleCIを実行する際、コンテナ上でgitアクセスがあるときに鍵がないよ〜と怒られたので。
(CircleCIサーバでは設定項目として鍵ファイルを指定することができる)

注意①

コンテナ上のディレクトリのパスは絶対パスで指定する。
相対パスを指定すると怒られる。

注意②

上記例のようにローカルの ~/.ssh をまるごとマウントすると、不要な他のファイルがマウントされて悪さしたりとかあるので、専用のディレクトリを作ってマウントしたほうがいいと思います。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?