Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage



- apt-get update -y
- apt-get install -y ssh



1 answer

2 votes


一般に apt package のキャッシュディレクトリは下記コマンドで動的に取得できるようです。

eval $(apt-config shell CACHE Dir::Cache)

Ref. Stack Exchange

こちらで取得できる $CACHE 変数の指定をご検討ください。

あるいは ssh などを含めてセットアップ済みの環境を Docker イメージとして作成しておきレイヤーをキャッシュさせるのも手かと存じます。




eval $(apt-config shell CACHE Dir::Cache)
eval $(apt-config shell ARCHIVES Dir::Cache::archives)

apt-get update && apt-get install -y ssh
ls -la /${CACHE}${ARCHIVES}
total 28
drwxr-xr-x. 1 root root 4096 Nov 15 05:22 .
drwxr-xr-x. 1 root root 4096 Jan 24 2017 ..
-rw-r-----. 1 root root 0 Jan 16 2017 lock
drwxr-xr-x. 1 root root 4096 Nov 15 05:22 partial
Like Kenta Yamamoto likes this

類似の問題について検索してみましたがパッケージをキャッシュさせるのは難しいようでDocker にて環境を作成することがおすすめされておりました。

参考: Stack Overflow

環境のポータビリティも向上しますので Docker を採用するのがよいかとお見受けしました。Bitbucket Pipelines における Docker の利用方法についてはドキュメント Bitbucket Pipelines で Docker コマンドを実行する をご参照ください。

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,227 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you