There's no pip on atlassian/default-image:4

남성식 March 23, 2023

Hello!

I couldn't find pip on the default image.

How could I install it without using apt and cache the installed pip?

 

1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2023

Hi @남성식 

For your question, since you don't want to use apt, you can either download python source code and build it locally or set up a similar ubunto 22 server with the required python modules and copy the files from there.

I strongly recommend against both options.    

The recommend way would be to use a docker image which contains all your dependencies. You can either use it as the image which runs your pipeline step, or as the artifact of your build, and then pass it to next step as part of your artifacts or as part of your cache.

Have a look at:

  1. https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/  
  2. https://support.atlassian.com/bitbucket-cloud/docs/cache-dependencies/
  3. https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/
남성식 March 23, 2023

I agree with you totally, but I was curious, why the default image contains only python except pip. I thought there would be a special way to get pip. But it was not :-)

Would you please tell me why the default image doesn't contain pip?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events